File size: 469 Bytes
68d7816 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | import { collection } from '#/_base/di/collection';
import type { ServiceIdentifier } from '#/_base/di/instantiation';
export interface CommandRunContext {
readonly args: string;
get<T>(id: ServiceIdentifier<T>): T;
}
export interface CommandContribution {
readonly name: string;
readonly description?: string;
readonly run: (ctx: CommandRunContext) => void | Promise<void>;
}
export const CommandContribution = collection<CommandContribution>('command');
|