@kkdev92/vscode-ext-kit - v4.1.1
    Preparing search index...

    Interface CommandContract<TArgs, TResult>

    A typed command, pairing static metadata with runtime argument and result types.

    Type safety applies to calls made through the framework's executor. Invocation from the Command Palette, a keybinding, a menu or another extension is runtime input, which is what the optional args validator is for.

    export const RefreshProjects = defineCommandContract<
    readonly [options?: { force?: boolean }],
    { updated: number }
    >({ id: 'sample.refreshProjects', title: 'Refresh Projects' });
    interface CommandContract<TArgs extends readonly unknown[], TResult> {
        args?: ArgumentsValidator<TArgs>;
        descriptor: CommandDescriptor;
        returns?: () => TResult;
    }

    Type Parameters

    • TArgs extends readonly unknown[]
    • TResult
    Index

    Optional validator applied to arguments from untrusted callers.

    descriptor: CommandDescriptor

    Static metadata, including the id used for registration.

    returns?: () => TResult

    Phantom carrier for the result type. Never present at runtime.