Skip to content

API reference / @chanx-js/server / core / StandardSchemaV1

Interface: StandardSchemaV1<Input, Output> ​

Defined in: packages/server/src/standard-schema.ts:4

Type Parameters ​

Type ParameterDefault type
Inputunknown
OutputInput

Properties ​

~standard ​

ts
readonly ~standard: object;

Defined in: packages/server/src/standard-schema.ts:5

jsonSchema? ​

ts
readonly optional jsonSchema?: object;

Standard JSON Schema (https://standardschema.dev/json-schema), where the library has it.

jsonSchema.input ​
ts
readonly input: (options) => JsonSchema;
Parameters ​
ParameterType
options{ target: string; }
options.targetstring
Returns ​

JsonSchema

jsonSchema.output ​
ts
readonly output: (options) => JsonSchema;
Parameters ​
ParameterType
options{ target: string; }
options.targetstring
Returns ​

JsonSchema

types? ​

ts
readonly optional types?: object;
types.input ​
ts
readonly input: Input;
types.output ​
ts
readonly output: Output;

validate ​

ts
readonly validate: (value) => SchemaResult<Output> | Promise<SchemaResult<Output>>;
Parameters ​
ParameterType
valueunknown
Returns ​

SchemaResult<Output> | Promise<SchemaResult<Output>>

vendor ​

ts
readonly vendor: string;

version ​

ts
readonly version: 1;

MIT licensed