MultiDocumentOne or more Representations 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.
export type 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 = {
readonly representations: readonly [
Representation,
...Array<Representation>
]
(property) representations: {
0: Representation;
length: number;
toString: () => string;
toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string };
concat: { (...items: Array<ConcatArray<Representation>>): Array<Representation>; (...items: Array<Representation | ConcatArray<Representation>>): Array<Representation> };
join: (separator?: string) => string;
slice: (start?: number, end?: number) => Array<Representation>;
indexOf: (searchElement: Representation, fromIndex?: number) => number;
lastIndexOf: (searchElement: Representation, fromIndex?: number) => number;
every: { (predicate: (value: Representation, index: number, array: ReadonlyArray<Representation>) => value is S, thisArg?: any): this is readonly S[]; (predicate: (value: Representation, index: number, array: ReadonlyArray<Representation>) => unk…;
some: (predicate: (value: Representation, index: number, array: ReadonlyArray<Representation>) => unknown, thisArg?: any) => boolean;
forEach: (callbackfn: (value: Representation, index: number, array: ReadonlyArray<Representation>) => void, thisArg?: any) => void;
map: (callbackfn: (value: Representation, index: number, array: ReadonlyArray<Representation>) => U, thisArg?: any) => Array<U>;
filter: { (predicate: (value: Representation, index: number, array: ReadonlyArray<Representation>) => value is S, thisArg?: any): Array<S>; (predicate: (value: Representation, index: number, array: ReadonlyArray<Representation>) => unknown, thisAr…;
reduce: { (callbackfn: (previousValue: Representation, currentValue: Representation, currentIndex: number, array: ReadonlyArray<Representation>) => Representation): Representation; (callbackfn: (previousValue: Representation, currentValue: Represe…;
reduceRight: { (callbackfn: (previousValue: Representation, currentValue: Representation, currentIndex: number, array: ReadonlyArray<Representation>) => Representation): Representation; (callbackfn: (previousValue: Representation, currentValue: Represe…;
find: { (predicate: (value: Representation, index: number, obj: ReadonlyArray<Representation>) => value is S, thisArg?: any): S | undefined; (predicate: (value: Representation, index: number, obj: ReadonlyArray<Representation>) => unknown, thisA…;
findIndex: (predicate: (value: Representation, index: number, obj: ReadonlyArray<Representation>) => unknown, thisArg?: any) => number;
entries: () => ArrayIterator<[number, Representation]>;
keys: () => ArrayIterator<number>;
values: () => ArrayIterator<Representation>;
includes: (searchElement: Representation, fromIndex?: number) => boolean;
flatMap: (callback: (this: This, value: Representation, index: number, array: Array<Representation>) => U | ReadonlyArray<U>, thisArg?: This | undefined) => Array<U>;
flat: (this: A, depth?: D | undefined) => Array<FlatArray<A, D>>;
at: (index: number) => Representation | undefined;
findLast: { (predicate: (value: Representation, index: number, array: ReadonlyArray<Representation>) => value is S, thisArg?: any): S | undefined; (predicate: (value: Representation, index: number, array: ReadonlyArray<Representation>) => unknown, t…;
findLastIndex: (predicate: (value: Representation, index: number, array: ReadonlyArray<Representation>) => unknown, thisArg?: any) => number;
toReversed: () => Array<Representation>;
toSorted: (compareFn?: ((a: Representation, b: Representation) => number) | undefined) => Array<Representation>;
toSpliced: { (start: number, deleteCount: number, ...items: Array<Representation>): Array<Representation>; (start: number, deleteCount?: number): Array<Representation> };
with: (index: number, value: Representation) => Array<Representation>;
}
representations: readonly [type Representation =
| Declaration
| Reference
| Suspend
| Null
| Undefined
| Void
| Never
| Unknown
| Any
| String
| Number
| Boolean
| BigInt
| Symbol
| Literal
| UniqueSymbol
| ObjectKeyword
| Enum
| TemplateLiteral
| Arrays
| Objects
| Union
The core tagged union of all supported schema shapes.
Details
Each variant has a _tag discriminator. Switch on _tag to handle each
shape. Most variants carry optional annotations and some carry checks
for validation constraints.
Representation, ...interface Array<T>Array<type Representation =
| Declaration
| Reference
| Suspend
| Null
| Undefined
| Void
| Never
| Unknown
| Any
| String
| Number
| Boolean
| BigInt
| Symbol
| Literal
| UniqueSymbol
| ObjectKeyword
| Enum
| TemplateLiteral
| Arrays
| Objects
| Union
The core tagged union of all supported schema shapes.
Details
Each variant has a _tag discriminator. Switch on _tag to handle each
shape. Most variants carry optional annotations and some carry checks
for validation constraints.
Representation>]
readonly references: Referencesreferences: References
}