Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
26 lines
963 B
Plaintext
26 lines
963 B
Plaintext
import { GetPlanOptions, PlanResult, ActivationsService, BindingService, DeactivationsService, PlanResultCacheService } from '@inversifyjs/core';
|
|
|
|
interface PluginApi {
|
|
define(name: string | symbol, method: (...args: any[]) => unknown): void;
|
|
onPlan(handler: (options: GetPlanOptions, result: PlanResult) => void): void;
|
|
}
|
|
|
|
interface PluginContext {
|
|
readonly activationService: ActivationsService;
|
|
readonly bindingService: BindingService;
|
|
readonly deactivationService: DeactivationsService;
|
|
readonly planResultCacheService: PlanResultCacheService;
|
|
}
|
|
|
|
declare const isPlugin: unique symbol;
|
|
declare abstract class Plugin<TContainer> {
|
|
readonly [isPlugin]: true;
|
|
protected readonly _container: TContainer;
|
|
protected readonly _context: PluginContext;
|
|
constructor(container: TContainer, context: PluginContext);
|
|
abstract load(api: PluginApi): void;
|
|
}
|
|
|
|
export { Plugin, isPlugin };
|
|
export type { PluginApi, PluginContext };
|