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

    Interface StandardSchemaV1<Input, Output>

    A Standard Schema v1 validator.

    validate carries the spec's own return type — Result | Promise<Result> — so schemas typed against the spec assign in both directions without a cast. Do not narrow this to SchemaResult<Output> or widen Promise to PromiseLike: either change alters structural assignability with Standard Schema implementations. The bidirectional assignments in tests/capabilities/core/standard-schema-interop.test.ts guard this exact boundary.

    One parameter is enough even though the spec declares validate(value, options?): a source whose extra parameter is optional is assignable to a single-parameter target, verified by that same test against both the current spec shape and the one-parameter shape libraries ship today.

    The framework only ever consumes a schema synchronously; validateSchema rejects a promise at runtime rather than pretending it cannot happen.

    Assignable to the looser StandardSchemaLike the command argument path accepts, so an s.* schema can validate command arguments too.

    interface StandardSchemaV1<Input = unknown, Output = Input> {
        "~input"?: (value: Input) => void;
        "~standard": {
            validate: (
                value: unknown,
            ) => SchemaResult<Output> | Promise<SchemaResult<Output>>;
            vendor: string;
            version: 1;
        };
    }

    Type Parameters

    • Input = unknown
    • Output = Input
    Index
    "~input"?: (value: Input) => void

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

    "~standard": {
        validate: (
            value: unknown,
        ) => SchemaResult<Output> | Promise<SchemaResult<Output>>;
        vendor: string;
        version: 1;
    }