Schema.Struct<{
readonly _tag: Schema.tag<"Suspend">
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.Tuple<readonly []>
readonly thunk: Schema.suspend<$Representation>
}>Schema for the Suspend representation node.
schemasSuspend
Source effect/SchemaRepresentation.ts:15186 lines
export const const $Suspend: anyconst $Suspend: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: <To>(f: (fields: { readonly _tag: Schema.tag<'Suspend'>; readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, n…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<{ readonly _tag: 'Suspend'; readonly checks: readonly []; readonly thunk: Representation; readonly annotations?: { readonly [x: string]: unknown; } | undefined; }, readonly []>) => Schema.Struct<{ re…;
annotateKey: (annotations: Schema.Annotations.Key<{ readonly _tag: 'Suspend'; readonly checks: readonly []; readonly thunk: Representation; readonly annotations?: { readonly [x: string]: unknown; } | undefined; }>) => Schema.Struct<{ readonly _tag: Sch…;
check: (checks_0: SchemaAST.Check<{ readonly _tag: 'Suspend'; readonly checks: readonly []; readonly thunk: Representation; readonly annotations?: { readonly [x: string]: unknown; } | undefined; }>, ...checks: Array<SchemaAST.Check<{ readonly _ta…;
rebuild: (ast: SchemaAST.Objects) => Schema.Struct<{ readonly _tag: Schema.tag<'Suspend'>; readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree…;
make: (input: { readonly checks: readonly []; readonly thunk: unknown; readonly _tag?: 'Suspend' | undefined; readonly annotations?: { readonly [x: string]: unknown; } | undefined; }, options?: Schema.MakeOptions) => { readonly _tag: 'Suspend'; …;
makeOption: (input: { readonly checks: readonly []; readonly thunk: unknown; readonly _tag?: 'Suspend' | undefined; readonly annotations?: { readonly [x: string]: unknown; } | undefined; }, options?: Schema.MakeOptions) => Option.Option<{ readonly _ta…;
makeEffect: (input: { readonly checks: readonly []; readonly thunk: unknown; readonly _tag?: 'Suspend' | undefined; readonly annotations?: { readonly [x: string]: unknown; } | undefined; }, options?: Schema.MakeOptions) => Effect<{ readonly _tag: 'Sus…;
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
Suspend
representation node.
$Suspend = import SchemaSchema.Struct({
_tag: Schema.tag<"Suspend">(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<'Suspend', readonly []>) => Schema.withConstructorDefault<Schema.Literal<'Suspend'>>;
annotateKey: (annotations: Schema.Annotations.Key<'Suspend'>) => Schema.withConstructorDefault<Schema.Literal<'Suspend'>>;
check: (checks_0: SchemaAST.Check<'Suspend'>, ...checks: Array<SchemaAST.Check<'Suspend'>>) => Schema.withConstructorDefault<Schema.Literal<'Suspend'>>;
rebuild: (ast: SchemaAST.Literal) => Schema.withConstructorDefault<Schema.Literal<'Suspend'>>;
make: (input: 'Suspend', options?: MakeOptions) => 'Suspend';
makeOption: (input: 'Suspend', options?: MakeOptions) => Option_.Option<'Suspend'>;
makeEffect: (input: 'Suspend', options?: MakeOptions) => Effect.Effect<'Suspend', 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("Suspend"),
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: any(property) checks: {
Type: Tuple.Type<Elements>;
Encoded: Tuple.Encoded<Elements>;
DecodingServices: Tuple.DecodingServices<Elements>;
EncodingServices: Tuple.EncodingServices<Elements>;
Iso: Tuple.Iso<Elements>;
elements: Elements;
mapElements: <To>(f: (elements: readonly []) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined; } | undefined) => Schema.Tuple<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<readonly [], readonly []>) => Schema.Tuple<readonly []>;
annotateKey: (annotations: Schema.Annotations.Key<readonly []>) => Schema.Tuple<readonly []>;
check: (checks_0: SchemaAST.Check<readonly []>, ...checks: Array<SchemaAST.Check<readonly []>>) => Schema.Tuple<readonly []>;
rebuild: (ast: SchemaAST.Arrays) => Schema.Tuple<readonly []>;
make: (input: readonly [], options?: Schema.MakeOptions) => readonly [];
makeOption: (input: readonly [], options?: Schema.MakeOptions) => Option.Option<readonly []>;
makeEffect: (input: readonly [], options?: Schema.MakeOptions) => Effect<readonly [], 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; <…;
}
checks: import SchemaSchema.Tuple([]),
thunk: Schema.suspend<$Representation>(property) thunk: {
Type: S["Type"];
Encoded: S["Encoded"];
DecodingServices: S["DecodingServices"];
EncodingServices: S["EncodingServices"];
Iso: S["Iso"];
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Representation, any>) => Schema.suspend<$Representation>;
annotateKey: (annotations: Schema.Annotations.Key<Representation>) => Schema.suspend<$Representation>;
check: (checks_0: SchemaAST.Check<Representation>, ...checks: Array<SchemaAST.Check<Representation>>) => Schema.suspend<$Representation>;
rebuild: (ast: SchemaAST.Suspend) => Schema.suspend<$Representation>;
make: (input: unknown, options?: MakeOptions) => SchemaRepresentation.Representation;
makeOption: (input: unknown, options?: MakeOptions) => Option_.Option<SchemaRepresentation.Representation>;
makeEffect: (input: unknown, options?: MakeOptions) => Effect.Effect<SchemaRepresentation.Representation, 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; <…;
}
thunk: const Representation$ref: Schema.suspend<$Representation>const Representation$ref: {
Type: S["Type"];
Encoded: S["Encoded"];
DecodingServices: S["DecodingServices"];
EncodingServices: S["EncodingServices"];
Iso: S["Iso"];
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Representation, any>) => Schema.suspend<$Representation>;
annotateKey: (annotations: Schema.Annotations.Key<Representation>) => Schema.suspend<$Representation>;
check: (checks_0: SchemaAST.Check<Representation>, ...checks: Array<SchemaAST.Check<Representation>>) => Schema.suspend<$Representation>;
rebuild: (ast: SchemaAST.Suspend) => Schema.suspend<$Representation>;
make: (input: unknown, options?: MakeOptions) => SchemaRepresentation.Representation;
makeOption: (input: unknown, options?: MakeOptions) => Option_.Option<SchemaRepresentation.Representation>;
makeEffect: (input: unknown, options?: MakeOptions) => Effect.Effect<SchemaRepresentation.Representation, 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; <…;
}
Representation$ref
}).annotate({ identifier: stringidentifier: "Suspend" })Referenced by 1 symbols