Schema.Struct<{
readonly _tag: Schema.tag<"Number">
readonly annotations: Schema.optional<
Schema.decodeTo<
Schema.$Record<Schema.String, Schema.Unknown>,
Schema.$Record<
Schema.String,
Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>
>,
never,
never
>
>
readonly checks: Schema.$Array<
Schema.Codec<
Check<
| Schema.Struct.ReadonlySide<
{ readonly _tag: Schema.tag<"isInt"> },
"Type"
>
| Schema.Struct.ReadonlySide<
{
readonly _tag: Schema.tag<"isMultipleOf">
readonly divisor: Schema.Finite
},
"Type"
>
| Schema.Struct.ReadonlySide<
{ readonly _tag: Schema.tag<"isFinite"> },
"Type"
>
| Schema.Struct.ReadonlySide<
{
readonly _tag: Schema.tag<"isGreaterThan">
readonly exclusiveMinimum: Schema.Finite
},
"Type"
>
| Schema.Struct.ReadonlySide<
{
readonly _tag: Schema.tag<"isGreaterThanOrEqualTo">
readonly minimum: Schema.Finite
},
"Type"
>
| Schema.Struct.ReadonlySide<
{
readonly _tag: Schema.tag<"isLessThan">
readonly exclusiveMaximum: Schema.Finite
},
"Type"
>
| Schema.Struct.ReadonlySide<
{
readonly _tag: Schema.tag<"isLessThanOrEqualTo">
readonly maximum: Schema.Finite
},
"Type"
>
| {
readonly _tag: "isBetween"
readonly minimum: number
readonly maximum: number
readonly exclusiveMinimum?: boolean | undefined
readonly exclusiveMaximum?: boolean | undefined
}
>,
Check<
| Schema.Struct.ReadonlySide<
{ readonly _tag: Schema.tag<"isInt"> },
"Type"
>
| Schema.Struct.ReadonlySide<
{
readonly _tag: Schema.tag<"isMultipleOf">
readonly divisor: Schema.Finite
},
"Type"
>
| Schema.Struct.ReadonlySide<
{ readonly _tag: Schema.tag<"isFinite"> },
"Type"
>
| Schema.Struct.ReadonlySide<
{
readonly _tag: Schema.tag<"isGreaterThan">
readonly exclusiveMinimum: Schema.Finite
},
"Type"
>
| Schema.Struct.ReadonlySide<
{
readonly _tag: Schema.tag<"isGreaterThanOrEqualTo">
readonly minimum: Schema.Finite
},
"Type"
>
| Schema.Struct.ReadonlySide<
{
readonly _tag: Schema.tag<"isLessThan">
readonly exclusiveMaximum: Schema.Finite
},
"Type"
>
| Schema.Struct.ReadonlySide<
{
readonly _tag: Schema.tag<"isLessThanOrEqualTo">
readonly maximum: Schema.Finite
},
"Type"
>
| {
readonly _tag: "isBetween"
readonly minimum: number
readonly maximum: number
readonly exclusiveMinimum?: boolean | undefined
readonly exclusiveMaximum?: boolean | undefined
}
>,
never,
never
>
>
}>Schema for the Number representation node.
schemasNumber
Source effect/SchemaRepresentation.ts:11095 lines
export const const $Number: anyconst $Number: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: { readonly _tag: Schema.tag<'Number'>; readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<{ readonly _tag: 'Number'; readonly checks: ReadonlyArray<Check<Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'isInt'>; }, 'Type'> | Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'i…;
annotateKey: (annotations: Schema.Annotations.Key<{ readonly _tag: 'Number'; readonly checks: ReadonlyArray<Check<Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'isInt'> }, 'Type'> | Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'isMul…;
check: (checks_0: SchemaAST.Check<{ readonly _tag: 'Number'; readonly checks: ReadonlyArray<Check<Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'isInt'> }, 'Type'> | Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'isMultipleOf'>;…;
rebuild: (ast: SchemaAST.Objects) => Schema.Struct<{ readonly _tag: Schema.tag<'Number'>; readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree,…;
make: (input: { readonly checks: ReadonlyArray<unknown>; readonly _tag?: 'Number' | undefined; readonly annotations?: { readonly [x: string]: unknown } | undefined }, options?: MakeOptions) => { readonly _tag: 'Number'; readonly checks: Readonly…;
makeOption: (input: { readonly checks: ReadonlyArray<unknown>; readonly _tag?: 'Number' | undefined; readonly annotations?: { readonly [x: string]: unknown } | undefined }, options?: MakeOptions) => Option_.Option<{ readonly _tag: 'Number'; readonly c…;
makeEffect: (input: { readonly checks: ReadonlyArray<unknown>; readonly _tag?: 'Number' | undefined; readonly annotations?: { readonly [x: string]: unknown } | undefined }, options?: MakeOptions) => Effect.Effect<{ readonly _tag: 'Number'; readonly ch…;
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 for the
Number
representation node.
$Number = import SchemaSchema.Struct({
_tag: Schema.tag<"Number">(property) _tag: {
Type: S["Type"];
Encoded: S["Encoded"];
DecodingServices: S["DecodingServices"];
EncodingServices: S["EncodingServices"];
Iso: S["Iso"];
schema: S;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<'Number', readonly []>) => Schema.withConstructorDefault<Schema.Literal<'Number'>>;
annotateKey: (annotations: Schema.Annotations.Key<'Number'>) => Schema.withConstructorDefault<Schema.Literal<'Number'>>;
check: (checks_0: SchemaAST.Check<'Number'>, ...checks: Array<SchemaAST.Check<'Number'>>) => Schema.withConstructorDefault<Schema.Literal<'Number'>>;
rebuild: (ast: SchemaAST.Literal) => Schema.withConstructorDefault<Schema.Literal<'Number'>>;
make: (input: 'Number', options?: MakeOptions) => 'Number';
makeOption: (input: 'Number', options?: MakeOptions) => Option_.Option<'Number'>;
makeEffect: (input: 'Number', options?: MakeOptions) => Effect.Effect<'Number', 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; <…;
}
_tag: import SchemaSchema.tag("Number"),
annotations: Schema.optional<
Schema.decodeTo<
Schema.$Record<Schema.String, Schema.Unknown>,
Schema.$Record<
Schema.String,
Schema.Codec<
PrimitiveTree,
PrimitiveTree,
never,
never
>
>,
never,
never
>
>
(property) annotations: {
Rebuild: optional<S>;
Type: S["Type"];
Encoded: S["Encoded"];
DecodingServices: S["DecodingServices"];
EncodingServices: S["EncodingServices"];
Iso: S["Iso"];
schema: S;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<{ readonly [x: string]: unknown; } | undefined, readonly []>) => Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTre…;
annotateKey: (annotations: Schema.Annotations.Key<{ readonly [x: string]: unknown } | undefined>) => Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree,…;
check: (checks_0: SchemaAST.Check<{ readonly [x: string]: unknown } | undefined>, ...checks: Array<SchemaAST.Check<{ readonly [x: string]: unknown } | undefined>>) => Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, …;
rebuild: (ast: SchemaAST.Union<SchemaAST.Undefined | SchemaAST.Objects>) => Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>>, neve…;
make: (input: { readonly [x: string]: unknown } | undefined, options?: MakeOptions) => { readonly [x: string]: unknown } | undefined;
makeOption: (input: { readonly [x: string]: unknown } | undefined, options?: MakeOptions) => Option_.Option<{ readonly [x: string]: unknown } | undefined>;
makeEffect: (input: { readonly [x: string]: unknown } | undefined, options?: MakeOptions) => Effect.Effect<{ readonly [x: string]: unknown } | undefined, 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; <…;
}
annotations: import SchemaSchema.optional(const $Annotations: Schema.decodeTo<
Schema.$Record<Schema.String, Schema.Unknown>,
Schema.$Record<
Schema.String,
Schema.Codec<
PrimitiveTree,
PrimitiveTree,
never,
never
>
>,
never,
never
>
const $Annotations: {
Type: To["Type"];
Encoded: From["Encoded"];
DecodingServices: To["DecodingServices"] | From["DecodingServices"] | RD;
EncodingServices: To["EncodingServices"] | From["EncodingServices"] | RE;
Iso: To["Iso"];
from: From;
to: To;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<{ readonly [x: string]: unknown; }, readonly []>) => Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, nev…;
annotateKey: (annotations: Schema.Annotations.Key<{ readonly [x: string]: unknown }>) => Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>>, never, neve…;
check: (checks_0: SchemaAST.Check<{ readonly [x: string]: unknown }>, ...checks: Array<SchemaAST.Check<{ readonly [x: string]: unknown }>>) => Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Cod…;
rebuild: (ast: SchemaAST.Objects) => Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, never>>, never, never>;
make: (input: { readonly [x: string]: unknown }, options?: MakeOptions) => { readonly [x: string]: unknown };
makeOption: (input: { readonly [x: string]: unknown }, options?: MakeOptions) => Option_.Option<{ readonly [x: string]: unknown }>;
makeEffect: (input: { readonly [x: string]: unknown }, options?: MakeOptions) => Effect.Effect<{ readonly [x: string]: unknown }, 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 for serializing public Schema.Annotations.Annotations values. It
filters out internal annotation keys and non-primitive values during
encoding.
When to use
Use to serialize schema annotations in representation schemas while retaining
only primitive-tree metadata.
Details
Decoding is passthrough. Encoding removes internal annotation keys and values
that are not accepted by $PrimitiveTree.
$Annotations),
checks: Schema.$Array<
Schema.Codec<
Check<
| Schema.Struct.ReadonlySide<
{ readonly _tag: Schema.tag<"isInt"> },
"Type"
>
| Schema.Struct.ReadonlySide<
{
readonly _tag: Schema.tag<"isMultipleOf">
readonly divisor: Schema.Finite
},
"Type"
>
| Schema.Struct.ReadonlySide<
{
readonly _tag: Schema.tag<"isFinite">
},
"Type"
>
| Schema.Struct.ReadonlySide<
{
readonly _tag: Schema.tag<"isGreaterThan">
readonly exclusiveMinimum: Schema.Finite
},
"Type"
>
| Schema.Struct.ReadonlySide<
{
readonly _tag: Schema.tag<"isGreaterThanOrEqualTo">
readonly minimum: Schema.Finite
},
"Type"
>
| Schema.Struct.ReadonlySide<
{
readonly _tag: Schema.tag<"isLessThan">
readonly exclusiveMaximum: Schema.Finite
},
"Type"
>
| Schema.Struct.ReadonlySide<
{
readonly _tag: Schema.tag<"isLessThanOrEqualTo">
readonly maximum: Schema.Finite
},
"Type"
>
| {
readonly _tag: "isBetween"
readonly minimum: number
readonly maximum: number
readonly exclusiveMinimum?:
| boolean
| undefined
readonly exclusiveMaximum?:
| boolean
| undefined
}
>,
Check<
| Schema.Struct.ReadonlySide<
{ readonly _tag: Schema.tag<"isInt"> },
"Type"
>
| Schema.Struct.ReadonlySide<
{
readonly _tag: Schema.tag<"isMultipleOf">
readonly divisor: Schema.Finite
},
"Type"
>
| Schema.Struct.ReadonlySide<
{
readonly _tag: Schema.tag<"isFinite">
},
"Type"
>
| Schema.Struct.ReadonlySide<
{
readonly _tag: Schema.tag<"isGreaterThan">
readonly exclusiveMinimum: Schema.Finite
},
"Type"
>
| Schema.Struct.ReadonlySide<
{
readonly _tag: Schema.tag<"isGreaterThanOrEqualTo">
readonly minimum: Schema.Finite
},
"Type"
>
| Schema.Struct.ReadonlySide<
{
readonly _tag: Schema.tag<"isLessThan">
readonly exclusiveMaximum: Schema.Finite
},
"Type"
>
| Schema.Struct.ReadonlySide<
{
readonly _tag: Schema.tag<"isLessThanOrEqualTo">
readonly maximum: Schema.Finite
},
"Type"
>
| {
readonly _tag: "isBetween"
readonly minimum: number
readonly maximum: number
readonly exclusiveMinimum?:
| boolean
| undefined
readonly exclusiveMaximum?:
| boolean
| undefined
}
>,
never,
never
>
>
(property) checks: {
Type: ReadonlyArray<S["Type"]>;
Encoded: ReadonlyArray<S["Encoded"]>;
DecodingServices: S["DecodingServices"];
EncodingServices: S["EncodingServices"];
Iso: ReadonlyArray<S["Iso"]>;
value: S;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<ReadonlyArray<Check<Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'isInt'>; }, 'Type'> | Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'isMultipleOf'>; readonly divisor: Schema.Fini…;
annotateKey: (annotations: Schema.Annotations.Key<ReadonlyArray<Check<Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'isInt'> }, 'Type'> | Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'isMultipleOf'>; readonly divisor: Schema.Finite }…;
check: (checks_0: SchemaAST.Check<ReadonlyArray<Check<Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'isInt'> }, 'Type'> | Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'isMultipleOf'>; readonly divisor: Schema.Finite }, 'Type'> …;
rebuild: (ast: SchemaAST.Arrays) => Schema.$Array<Schema.Codec<Check<Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'isInt'> }, 'Type'> | Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'isMultipleOf'>; readonly divisor: Schema.Finit…;
make: (input: ReadonlyArray<unknown>, options?: MakeOptions) => ReadonlyArray<SchemaRepresentation.Check<Struct.ReadonlySide<{ readonly _tag: tag<'isInt'> }, 'Type'> | Struct.ReadonlySide<{ readonly _tag: tag<'isMultipleOf'>; readonly divisor: F…;
makeOption: (input: ReadonlyArray<unknown>, options?: MakeOptions) => Option_.Option<ReadonlyArray<SchemaRepresentation.Check<Struct.ReadonlySide<{ readonly _tag: tag<'isInt'> }, 'Type'> | Struct.ReadonlySide<{ readonly _tag: tag<'isMultipleOf'>; read…;
makeEffect: (input: ReadonlyArray<unknown>, options?: MakeOptions) => Effect.Effect<ReadonlyArray<SchemaRepresentation.Check<Struct.ReadonlySide<{ readonly _tag: tag<'isInt'> }, 'Type'> | Struct.ReadonlySide<{ readonly _tag: tag<'isMultipleOf'>; reado…;
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; <…;
}
checks: import SchemaSchema.Array(function makeCheck<T>(
meta: Schema.Codec<T>,
identifier: string
): Schema.Codec<Check<T>, Check<T>, never, never>
makeCheck(const $NumberMeta: Schema.Union<
readonly [
Schema.Struct<{
readonly _tag: Schema.tag<"isInt">
}>,
Schema.Struct<{
readonly _tag: Schema.tag<"isMultipleOf">
readonly divisor: Schema.Finite
}>,
Schema.Struct<{
readonly _tag: Schema.tag<"isFinite">
}>,
Schema.Struct<{
readonly _tag: Schema.tag<"isGreaterThan">
readonly exclusiveMinimum: Schema.Finite
}>,
Schema.Struct<{
readonly _tag: Schema.tag<"isGreaterThanOrEqualTo">
readonly minimum: Schema.Finite
}>,
Schema.Struct<{
readonly _tag: Schema.tag<"isLessThan">
readonly exclusiveMaximum: Schema.Finite
}>,
Schema.Struct<{
readonly _tag: Schema.tag<"isLessThanOrEqualTo">
readonly maximum: Schema.Finite
}>,
Schema.Struct<{
readonly _tag: Schema.tag<"isBetween">
readonly minimum: Schema.Finite
readonly maximum: Schema.Finite
readonly exclusiveMinimum: Schema.optional<Schema.Boolean>
readonly exclusiveMaximum: Schema.optional<Schema.Boolean>
}>
]
>
const $NumberMeta: {
Type: { [K in keyof Members]: Members[K]["Type"]; }[number];
Encoded: { [K in keyof Members]: Members[K]["Encoded"]; }[number];
DecodingServices: { [K in keyof Members]: Members[K]["DecodingServices"]; }[number];
EncodingServices: { [K in keyof Members]: Members[K]["EncodingServices"]; }[number];
Iso: { [K in keyof Members]: Members[K]["Iso"]; }[number];
members: Members;
mapMembers: (f: (members: readonly [Schema.Struct<{ readonly _tag: Schema.tag<'isInt'> }>, Schema.Struct<{ readonly _tag: Schema.tag<'isMultipleOf'>; readonly divisor: Schema.Finite }>, Schema.Struct<{ readonly _tag: Schema.tag<'isFinite'> }>, Schema.…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'isInt'>; }, 'Type'> | Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'isMultipleOf'>; readonly divisor: Schema.Finite; }, 'Type'> | Sch…;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'isInt'> }, 'Type'> | Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'isMultipleOf'>; readonly divisor: Schema.Finite }, 'Type'> | Schema.S…;
check: (checks_0: SchemaAST.Check<Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'isInt'> }, 'Type'> | Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'isMultipleOf'>; readonly divisor: Schema.Finite }, 'Type'> | Schema.Struct.Read…;
rebuild: (ast: SchemaAST.Union<SchemaAST.Objects>) => Schema.Union<readonly [Schema.Struct<{ readonly _tag: Schema.tag<'isInt'> }>, Schema.Struct<{ readonly _tag: Schema.tag<'isMultipleOf'>; readonly divisor: Schema.Finite }>, Schema.Struct<{ reado…;
make: (input: { readonly _tag?: 'isInt' | undefined } | { readonly divisor: number; readonly _tag?: 'isMultipleOf' | undefined } | { readonly _tag?: 'isFinite' | undefined } | { readonly exclusiveMinimum: number; readonly _tag?: 'isGreaterThan' …;
makeOption: (input: { readonly _tag?: 'isInt' | undefined } | { readonly divisor: number; readonly _tag?: 'isMultipleOf' | undefined } | { readonly _tag?: 'isFinite' | undefined } | { readonly exclusiveMinimum: number; readonly _tag?: 'isGreaterThan' …;
makeEffect: (input: { readonly _tag?: 'isInt' | undefined } | { readonly divisor: number; readonly _tag?: 'isMultipleOf' | undefined } | { readonly _tag?: 'isFinite' | undefined } | { readonly exclusiveMinimum: number; readonly _tag?: 'isGreaterThan' …;
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 for
NumberMeta
.
$NumberMeta, "Number"))
}).annotate({ identifier: stringidentifier: "Number" })Referenced by 1 symbols