Schema

tcmts.cli.commands.Schema · #qunnhjvu · type

A Standard Schema (what router validates and types parameters with), for the few shapes tcm's take.

export interface Schema<T> {
  readonly "~standard": {
    readonly version: 1;
    readonly vendor: string;
    readonly validate: (value: unknown) => { readonly value: T } | { readonly issues: readonly { readonly message: string }[] };
    readonly types?: { readonly input: unknown; readonly output: T };
  };
}

used by