Schema.Struct<{
readonly _tag: Schema.tag<"UniqueSymbol">
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 symbol: Schema.Symbol
}>Schema for the UniqueSymbol representation node.
schemasUniqueSymbol
Source effect/SchemaRepresentation.ts:12295 lines
export const const $UniqueSymbol: Schema.Struct<{
readonly _tag: Schema.tag<"UniqueSymbol">
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 symbol: Schema.Symbol
}>
const $UniqueSymbol: {
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<'UniqueSymbol'>; readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<PrimitiveTree, PrimitiveTree, never, …;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<{ readonly symbol: symbol; readonly _tag: 'UniqueSymbol'; readonly annotations?: { readonly [x: string]: unknown; } | undefined; }, readonly []>) => Schema.Struct<{ readonly _tag: Schema.tag<'UniqueS…;
annotateKey: (annotations: Schema.Annotations.Key<{ readonly symbol: symbol; readonly _tag: 'UniqueSymbol'; readonly annotations?: { readonly [x: string]: unknown } | undefined }>) => Schema.Struct<{ readonly _tag: Schema.tag<'UniqueSymbol'>; readonly …;
check: (checks_0: SchemaAST.Check<{ readonly symbol: symbol; readonly _tag: 'UniqueSymbol'; readonly annotations?: { readonly [x: string]: unknown } | undefined }>, ...checks: Array<SchemaAST.Check<{ readonly symbol: symbol; readonly _tag: 'Uniqu…;
rebuild: (ast: SchemaAST.Objects) => Schema.Struct<{ readonly _tag: Schema.tag<'UniqueSymbol'>; readonly annotations: Schema.optional<Schema.decodeTo<Schema.$Record<Schema.String, Schema.Unknown>, Schema.$Record<Schema.String, Schema.Codec<Primitiv…;
make: (input: { readonly symbol: symbol; readonly _tag?: 'UniqueSymbol' | undefined; readonly annotations?: { readonly [x: string]: unknown } | undefined }, options?: MakeOptions) => { readonly symbol: symbol; readonly _tag: 'UniqueSymbol'; read…;
makeOption: (input: { readonly symbol: symbol; readonly _tag?: 'UniqueSymbol' | undefined; readonly annotations?: { readonly [x: string]: unknown } | undefined }, options?: MakeOptions) => Option_.Option<{ readonly symbol: symbol; readonly _tag: 'Uniq…;
makeEffect: (input: { readonly symbol: symbol; readonly _tag?: 'UniqueSymbol' | undefined; readonly annotations?: { readonly [x: string]: unknown } | undefined }, options?: MakeOptions) => Effect.Effect<{ readonly symbol: symbol; readonly _tag: 'Uniqu…;
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
UniqueSymbol
representation node.
$UniqueSymbol = import SchemaSchema.Struct({
_tag: Schema.tag<"UniqueSymbol">(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<'UniqueSymbol', readonly []>) => Schema.withConstructorDefault<Schema.Literal<'UniqueSymbol'>>;
annotateKey: (annotations: Schema.Annotations.Key<'UniqueSymbol'>) => Schema.withConstructorDefault<Schema.Literal<'UniqueSymbol'>>;
check: (checks_0: SchemaAST.Check<'UniqueSymbol'>, ...checks: Array<SchemaAST.Check<'UniqueSymbol'>>) => Schema.withConstructorDefault<Schema.Literal<'UniqueSymbol'>>;
rebuild: (ast: SchemaAST.Literal) => Schema.withConstructorDefault<Schema.Literal<'UniqueSymbol'>>;
make: (input: 'UniqueSymbol', options?: MakeOptions) => 'UniqueSymbol';
makeOption: (input: 'UniqueSymbol', options?: MakeOptions) => Option_.Option<'UniqueSymbol'>;
makeEffect: (input: 'UniqueSymbol', options?: MakeOptions) => Effect.Effect<'UniqueSymbol', 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("UniqueSymbol"),
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),
symbol: Schema.Symbol(property) symbol: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<symbol, readonly []>) => Schema.Symbol;
annotateKey: (annotations: Schema.Annotations.Key<symbol>) => Schema.Symbol;
check: (checks_0: SchemaAST.Check<symbol>, ...checks: Array<SchemaAST.Check<symbol>>) => Schema.Symbol;
rebuild: (ast: SchemaAST.Symbol) => Schema.Symbol;
make: (input: symbol, options?: MakeOptions) => symbol;
makeOption: (input: symbol, options?: MakeOptions) => Option_.Option<symbol>;
makeEffect: (input: symbol, options?: MakeOptions) => Effect.Effect<symbol, 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; <…;
}
symbol: import SchemaSchema.Symbol
}).annotate({ identifier: stringidentifier: "UniqueSymbol" })Referenced by 1 symbols