Schema
Generated by TypeDoc. Do not edit this page directly.
Abstract Class: Schema<TInput, TOutput>
Section titled “Abstract Class: Schema<TInput, TOutput>”Defined in: packages/core/src/schema/index.ts:75
Extended by
Section titled “Extended by”StringSchemaNumberSchemaBooleanSchemaArraySchemaObjectSchemaRecordSchemaEnumSchemaLiteralSchemaOptionalSchemaDefaultSchemaUnknownSchema
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
TInput | unknown |
TOutput | TInput |
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Schema<TInput, TOutput>(): Schema<TInput, TOutput>;Returns
Section titled “Returns”Schema<TInput, TOutput>
Properties
Section titled “Properties”| Property | Modifier | Type | Default value | Defined in |
|---|---|---|---|---|
isHarnessSchema | readonly | true | true | packages/core/src/schema/index.ts:76 |
Methods
Section titled “Methods”default()
Section titled “default()”default(value): DefaultSchema<TInput | undefined, TOutput>;Defined in: packages/core/src/schema/index.ts:92
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value | TOutput | (() => TOutput) |
Returns
Section titled “Returns”DefaultSchema<TInput | undefined, TOutput>
describe()
Section titled “describe()”describe(description): this;Defined in: packages/core/src/schema/index.ts:96
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
description | string |
Returns
Section titled “Returns”this
optional()
Section titled “optional()”optional(): OptionalSchema<TInput | undefined, TOutput | undefined>;Defined in: packages/core/src/schema/index.ts:88
Returns
Section titled “Returns”OptionalSchema<TInput | undefined, TOutput | undefined>
parse()
Section titled “parse()”parse(input): TOutput;Defined in: packages/core/src/schema/index.ts:82
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input | TInput |
Returns
Section titled “Returns”TOutput
safeParse()
Section titled “safeParse()”abstract safeParse(input): SafeParseResult<TOutput>;Defined in: packages/core/src/schema/index.ts:79
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input | unknown |
Returns
Section titled “Returns”SafeParseResult<TOutput>
toJsonSchema()
Section titled “toJsonSchema()”abstract toJsonSchema(): JsonSchema;Defined in: packages/core/src/schema/index.ts:80