Schema.Codec<MultiDocument, Schema.Json, never, never>Schema for MultiDocument values encoded as JSON.
Source effect/SchemaRepresentation.ts:16951 lines
export const const MultiDocumentFromJson: Schema.Codec<
MultiDocument,
Schema.Json
>
const MultiDocumentFromJson: {
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
Rebuild: Codec<T, E, RD, RE>;
Type: T;
Iso: Iso;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<MultiDocument, any>) => Schema.Codec<MultiDocument, Schema.Json, never, never>;
annotateKey: (annotations: Schema.Annotations.Key<MultiDocument>) => Schema.Codec<MultiDocument, Schema.Json, never, never>;
check: (checks_0: SchemaAST.Check<MultiDocument>, ...checks: Array<SchemaAST.Check<MultiDocument>>) => Schema.Codec<MultiDocument, Schema.Json, never, never>;
rebuild: (ast: SchemaAST.AST) => Schema.Codec<MultiDocument, Schema.Json, never, never>;
make: (input: unknown, options?: MakeOptions) => SchemaRepresentation.MultiDocument;
makeOption: (input: unknown, options?: MakeOptions) => Option_.Option<SchemaRepresentation.MultiDocument>;
makeEffect: (input: unknown, options?: MakeOptions) => Effect.Effect<SchemaRepresentation.MultiDocument, 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 MultiDocument values encoded as JSON.
MultiDocumentFromJson: import SchemaSchema.type Schema.Codec = /*unresolved*/ anyCodec<type MultiDocument = {
readonly representations: readonly [
Representation,
...Array<Representation>
]
readonly references: References
}
One or more
Representation
s sharing a common
References
map.
When to use
Use when you use
fromASTs
to create this from multiple Schema ASTs,
toCodeDocument
to generate TypeScript code, and
toJsonSchemaMultiDocument
to convert to JSON Schema.
MultiDocument, import SchemaSchema.type Schema.Json = /*unresolved*/ anyJson> = import SchemaSchema.toCodecJson(const $MultiDocument: Schema.Struct<{
readonly representations: Schema.NonEmptyArray<$Representation>
readonly references: Schema.$Record<
Schema.String,
$Representation
>
}>
const $MultiDocument: {
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 representations: Schema.NonEmptyArray<$Representation>; readonly references: Schema.$Record<Schema.String, $Representation> }) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) =>…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.ReadonlySide<{ readonly representations: Schema.NonEmptyArray<$Representation>; readonly references: Schema.$Record<Schema.String, $Representation>; }, 'Type'>, readonly []>) => Schema.…;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.ReadonlySide<{ readonly representations: Schema.NonEmptyArray<$Representation>; readonly references: Schema.$Record<Schema.String, $Representation> }, 'Type'>>) => Schema.Struct<{ readonly…;
check: (checks_0: SchemaAST.Check<Schema.Struct.ReadonlySide<{ readonly representations: Schema.NonEmptyArray<$Representation>; readonly references: Schema.$Record<Schema.String, $Representation> }, 'Type'>>, ...checks: Array<SchemaAST.Check<Sche…;
rebuild: (ast: SchemaAST.Objects) => Schema.Struct<{ readonly representations: Schema.NonEmptyArray<$Representation>; readonly references: Schema.$Record<Schema.String, $Representation> }>;
make: (input: Struct.ReadonlyMakeIn<{ readonly representations: NonEmptyArray<SchemaRepresentation.$Representation>; readonly references: $Record<String, SchemaRepresentation.$Representation> }>, options?: MakeOptions) => Struct.ReadonlySide<{ r…;
makeOption: (input: Struct.ReadonlyMakeIn<{ readonly representations: NonEmptyArray<SchemaRepresentation.$Representation>; readonly references: $Record<String, SchemaRepresentation.$Representation> }>, options?: MakeOptions) => Option_.Option<Struct.R…;
makeEffect: (input: Struct.ReadonlyMakeIn<{ readonly representations: NonEmptyArray<SchemaRepresentation.$Representation>; readonly references: $Record<String, SchemaRepresentation.$Representation> }>, options?: MakeOptions) => Effect.Effect<Struct.Re…;
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
MultiDocument
.
$MultiDocument)