(schema: Schema.Top): numberRead an item schema's version; defaults to 1 when unannotated.
item codecswithSchemaVersion
Source src/internal/queueHyperlink.ts:2604 lines
export const const schemaVersionOf: (
schema: Schema.Top
) => number
Read an item schema's
withSchemaVersion
; defaults to 1 when unannotated.
schemaVersionOf = (schema: Schema.Top(parameter) schema: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<unknown, any>) => Schema.Top;
annotateKey: (annotations: Schema.Annotations.Key<unknown>) => Schema.Top;
check: (checks_0: Check<unknown>, ...checks: Array<Check<unknown>>) => Schema.Top;
rebuild: (ast: AST) => Schema.Top;
make: (input: unknown, options?: Schema.MakeOptions) => unknown;
makeOption: (input: unknown, options?: Schema.MakeOptions) => Option.Option<unknown>;
makeEffect: (input: unknown, options?: Schema.MakeOptions) => Effect.Effect<unknown, Schema.SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
schema: import SchemaSchema.Top): number => {
const const annotated: unknownannotated = import SchemaSchema.function resolveAnnotations<Schema.Top>(schema: Schema.Top): Schema.Annotations.Bottom<unknown, any> | undefinedResolves the typed annotations from a schema. The term "resolve" (rather
than "get") reflects the lookup strategy: if the schema has checks, the
annotations are taken from the last check; otherwise they are taken from
the base schema instance.
resolveAnnotations(schema: Schema.Top(parameter) schema: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<unknown, any>) => Schema.Top;
annotateKey: (annotations: Schema.Annotations.Key<unknown>) => Schema.Top;
check: (checks_0: Check<unknown>, ...checks: Array<Check<unknown>>) => Schema.Top;
rebuild: (ast: AST) => Schema.Top;
make: (input: unknown, options?: Schema.MakeOptions) => unknown;
makeOption: (input: unknown, options?: Schema.MakeOptions) => Option.Option<unknown>;
makeEffect: (input: unknown, options?: Schema.MakeOptions) => Effect.Effect<unknown, Schema.SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
schema)?.[const schemaVersionAnnotation: "schemaVersion"Annotation key carrying an item schema's version — the anchor for the @vN marker that
travels on released / handoff entries and the future upcast/migration history.
schemaVersionAnnotation];
return typeof const annotated: unknownannotated === "number" ? const annotated: numberannotated : 1;
};
Referenced by 1 symbols