mirror of
https://github.com/certd/certd.git
synced 2026-06-27 14:07:33 +08:00
28 lines
543 B
TypeScript
28 lines
543 B
TypeScript
/**
|
|
* 运行时动态导入函数类型
|
|
*/
|
|
export type ImportRuntime = (specifier: string, logger?: ILogger) => Promise<any>;
|
|
|
|
/**
|
|
* 日志接口
|
|
*/
|
|
export type ILogger = {
|
|
info: (message: string) => void;
|
|
};
|
|
|
|
/**
|
|
* 运行时依赖服务参数
|
|
*/
|
|
export type EnsureRuntimeDepsOptions = {
|
|
pluginKeys: string | string[];
|
|
logger?: ILogger;
|
|
};
|
|
|
|
/**
|
|
* 运行时依赖服务接口
|
|
*/
|
|
export interface IRuntimeDepsService {
|
|
ensureRuntimeDependencies(options: EnsureRuntimeDepsOptions): Promise<any>;
|
|
importRuntime: ImportRuntime;
|
|
}
|