Schema.Union<
readonly [
typeof QueueMissingItemSchemaError,
typeof QueueItemEncodingError
]
>The releaseEncoded failure channel — the wire-encodable union of the engine's encode
errors (now Schema.TaggedErrorClass, so they are both yieldable and RPC-encodable).
wire schemas
Source src/QueueHyperlink.ts:4914 lines
export const const queueReleaseEncodingError: Schema.Union<
readonly [any, any]
>
const queueReleaseEncodingError: {
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 [any, any]) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Union<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<any, readonly []>) => Schema.Union<readonly [any, any]>;
annotateKey: (annotations: Schema.Annotations.Key<any>) => Schema.Union<readonly [any, any]>;
check: (checks_0: Check<any>, ...checks: Array<Check<any>>) => Schema.Union<readonly [any, any]>;
rebuild: (ast: Union<any>) => Schema.Union<readonly [any, any]>;
make: (input: any, options?: Schema.MakeOptions) => any;
makeOption: (input: any, options?: Schema.MakeOptions) => Option.Option<any>;
makeEffect: (input: any, options?: Schema.MakeOptions) => Effect.Effect<any, 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; <…;
}
The releaseEncoded failure channel — the wire-encodable union of the engine's encode
errors (now Schema.TaggedErrorClass, so they are both yieldable and RPC-encodable).
queueReleaseEncodingError = import SchemaSchema.function Union<readonly [any, any]>(members: readonly [any, any], options?: {
mode?: "anyOf" | "oneOf";
}): Schema.Union<readonly [any, any]>
Creates a union schema from an array of member schemas. Members are tested in
order; the first match is returned.
Details
Optionally, specify mode:
"anyOf" (default) — matches if any member matches.
"oneOf" — matches if exactly one member matches.
Example (Defining a string or number union)
import { Schema } from "effect"
const schema = Schema.Union([Schema.String, Schema.Number])
Schema.decodeUnknownSync(schema)("hello") // "hello"
Schema.decodeUnknownSync(schema)(42) // 42
Union([
import QueueMissingItemSchemaErrorQueueMissingItemSchemaError,
import QueueItemEncodingErrorQueueItemEncodingError,
]);
Referenced by 2 symbols