TypeScript type for an ECHO object schema. T is the instance type produced by the schema. Fields is the optional struct fields type for introspection.
T
Fields
const PersonSchema: Type.Obj<Person> = Schema.Struct({ name: Schema.String,}).pipe(Type.object({ typename: 'Person', version: '0.1.0' }));// Access fields for introspection:Object.keys(PersonSchema.fields); // ['name'] Copy
const PersonSchema: Type.Obj<Person> = Schema.Struct({ name: Schema.String,}).pipe(Type.object({ typename: 'Person', version: '0.1.0' }));// Access fields for introspection:Object.keys(PersonSchema.fields); // ['name']
Readonly
The fields defined in the original struct schema. Allows accessing field definitions for introspection.
Merges a set of new annotations with existing ones, potentially overwriting any duplicates.
TypeScript type for an ECHO object schema.
Tis the instance type produced by the schema.Fieldsis the optional struct fields type for introspection.Example