Skip to main content
Version: 1.2.0-beta1

Variable: mnemonicSchema

const mnemonicSchema: object

Defined in: src/Mnemonic/typed-schema.ts:148

Builder helpers for strongly typed schemas backed by Mnemonic's built-in JSON Schema subset.

The returned schemas are plain JsonSchema objects at runtime, so they can be registered directly in createSchemaRegistry(...) while also carrying a phantom TypeScript type for inference.

Type Declaration

NameTypeDefined in
array()(itemSchema, options?) => TypedJsonSchema<InferJsonSchemaValue<TItemSchema>[]>src/Mnemonic/typed-schema.ts:191
boolean()() => TypedJsonSchema<boolean>src/Mnemonic/typed-schema.ts:161
enum()(values) => TypedJsonSchema<TValues[number]>src/Mnemonic/typed-schema.ts:175
integer()(options?) => TypedJsonSchema<number>src/Mnemonic/typed-schema.ts:157
literal()(value) => TypedJsonSchema<TValue>src/Mnemonic/typed-schema.ts:169
nullable()(schema) => TypedJsonSchema<T | null>src/Mnemonic/typed-schema.ts:187
nullValue()() => TypedJsonSchema<null>src/Mnemonic/typed-schema.ts:165
number()(options?) => TypedJsonSchema<number>src/Mnemonic/typed-schema.ts:153
object()(shape, options?) => TypedJsonSchema<ObjectValueFromSchemas<TShape>>src/Mnemonic/typed-schema.ts:201
optional()(schema) => OptionalTypedJsonSchema<T>src/Mnemonic/typed-schema.ts:183
record()(valueSchema) => TypedJsonSchema<Record<string, InferJsonSchemaValue<TValueSchema>>>src/Mnemonic/typed-schema.ts:228
string()(options?) => TypedJsonSchema<string>src/Mnemonic/typed-schema.ts:149