@prisma/orm-framework 8.0.0-rc.21-dev.6 → 8.0.0-rc.21-dev.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{authoring-D75oR8Nt.d.mts → authoring-BKOoGNxH.d.mts} +56 -4
- package/dist/authoring-BKOoGNxH.d.mts.map +1 -0
- package/dist/{authoring-4wc_1ETR.mjs → authoring-CcfXu8Dz.mjs} +377 -31
- package/dist/authoring-CcfXu8Dz.mjs.map +1 -0
- package/dist/{framework-authoring-ebqZ8M_M-Bdi8MutX.d.mts → authoring-type-choice-CHcRX0RP-CkG1L8a9.d.mts} +111 -27
- package/dist/authoring-type-choice-CHcRX0RP-CkG1L8a9.d.mts.map +1 -0
- package/dist/{binder-BszqDG1t-pSH-fXt5.d.mts → binder-CMy3WM5A-DRrDzBAq.d.mts} +35 -17
- package/dist/{binder-BszqDG1t-pSH-fXt5.d.mts.map → binder-CMy3WM5A-DRrDzBAq.d.mts.map} +1 -1
- package/dist/{components-CHWGZJ5q.d.mts → components-BvnVHOK3.d.mts} +3 -3
- package/dist/{components-CHWGZJ5q.d.mts.map → components-BvnVHOK3.d.mts.map} +1 -1
- package/dist/components.d.mts +10 -10
- package/dist/components.mjs +4 -4
- package/dist/components__authoring.d.mts +4 -4
- package/dist/components__authoring.mjs +3 -3
- package/dist/components__components.d.mts +3 -3
- package/dist/components__control.d.mts +3 -3
- package/dist/components__control.mjs +2 -2
- package/dist/components__execution.d.mts +1 -1
- package/dist/components__psl-ast.d.mts +3 -3
- package/dist/{config-types-B0JjhuaX.d.mts → config-types-De3gHQOy.d.mts} +5 -5
- package/dist/{config-types-B0JjhuaX.d.mts.map → config-types-De3gHQOy.d.mts.map} +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config__config-types.d.mts +1 -1
- package/dist/contract-authoring.d.mts +2 -2
- package/dist/contract-authoring.mjs +3 -3
- package/dist/{control-DLpQIwer.mjs → control-BE0sjzPI.mjs} +6 -2
- package/dist/control-BE0sjzPI.mjs.map +1 -0
- package/dist/{control-BeXOxtXA-DyPvQsqJ.d.mts → control-BeXOxtXA-DOfRFBDx.d.mts} +2 -2
- package/dist/{control-BeXOxtXA-DyPvQsqJ.d.mts.map → control-BeXOxtXA-DOfRFBDx.d.mts.map} +1 -1
- package/dist/{control-BrO2h8ed.d.mts → control-DanUY6NX.d.mts} +5 -5
- package/dist/{control-BrO2h8ed.d.mts.map → control-DanUY6NX.d.mts.map} +1 -1
- package/dist/{control-MllEQmML-yjvIIvnf.mjs → control-MllEQmML-BgM0TgK3.mjs} +2 -2
- package/dist/{control-MllEQmML-yjvIIvnf.mjs.map → control-MllEQmML-BgM0TgK3.mjs.map} +1 -1
- package/dist/control-QJnHVB3m.d.mts +1 -0
- package/dist/{declarations-BgUAq1RG-D99LhVXe.mjs → declarations-BgUAq1RG-DvmyJ8LS.mjs} +2 -2
- package/dist/{declarations-BgUAq1RG-D99LhVXe.mjs.map → declarations-BgUAq1RG-DvmyJ8LS.mjs.map} +1 -1
- package/dist/errors.d.mts +4 -4
- package/dist/errors.mjs +3 -3
- package/dist/errors__control.d.mts +2 -2
- package/dist/errors__control.mjs +1 -1
- package/dist/errors__execution.d.mts +1 -1
- package/dist/errors__execution.mjs +1 -1
- package/dist/errors__migration.d.mts +1 -1
- package/dist/errors__migration.mjs +1 -1
- package/dist/{execution-CXXKXfwB.mjs → execution-BkFLjpfc.mjs} +2 -2
- package/dist/{execution-CXXKXfwB.mjs.map → execution-BkFLjpfc.mjs.map} +1 -1
- package/dist/{execution-Cgkrs6UV.d.mts → execution-C_12rfIR.d.mts} +2 -2
- package/dist/{execution-Cgkrs6UV.d.mts.map → execution-C_12rfIR.d.mts.map} +1 -1
- package/dist/{execution-BhFeCTkt.d.mts → execution-CyddhERj.d.mts} +2 -2
- package/dist/{execution-BhFeCTkt.d.mts.map → execution-CyddhERj.d.mts.map} +1 -1
- package/dist/{expressions-CMQzbnHk-Db8YJA0B.mjs → expressions-CMQzbnHk-B7zBWJ0c.mjs} +2 -2
- package/dist/{expressions-CMQzbnHk-Db8YJA0B.mjs.map → expressions-CMQzbnHk-B7zBWJ0c.mjs.map} +1 -1
- package/dist/{framework-components-BqHA1V92-D_nUDFf9.d.mts → framework-components-GBAmsfWO-DUJQpMpU.d.mts} +3 -3
- package/dist/{framework-components-BqHA1V92-D_nUDFf9.d.mts.map → framework-components-GBAmsfWO-DUJQpMpU.d.mts.map} +1 -1
- package/dist/{migration-CMMT3vcR.d.mts → migration-B7ur91Et.d.mts} +2 -2
- package/dist/{migration-CMMT3vcR.d.mts.map → migration-B7ur91Et.d.mts.map} +1 -1
- package/dist/{migration-B1TEF2ij.mjs → migration-CQufZA_7.mjs} +2 -2
- package/dist/{migration-B1TEF2ij.mjs.map → migration-CQufZA_7.mjs.map} +1 -1
- package/dist/{parse-bZgfjovA-CaBuZnet.mjs → parse-bZgfjovA-Vk8LMIu5.mjs} +3 -3
- package/dist/{parse-bZgfjovA-CaBuZnet.mjs.map → parse-bZgfjovA-Vk8LMIu5.mjs.map} +1 -1
- package/dist/{parse-djL5wker-Bf4uawTE.d.mts → parse-djL5wker-4_2Cqwev.d.mts} +6 -6
- package/dist/{parse-djL5wker-Bf4uawTE.d.mts.map → parse-djL5wker-4_2Cqwev.d.mts.map} +1 -1
- package/dist/{psl-ast-0oMzInxd-BjKbrwNk.d.mts → psl-ast-B4ZxpQdr-DT9LRqBC.d.mts} +3 -3
- package/dist/{psl-ast-0oMzInxd-BjKbrwNk.d.mts.map → psl-ast-B4ZxpQdr-DT9LRqBC.d.mts.map} +1 -1
- package/dist/psl-ast-Dsf1-QLK.d.mts +2 -0
- package/dist/psl-parser.d.mts +22 -13
- package/dist/psl-parser.d.mts.map +1 -1
- package/dist/psl-parser.mjs +29 -43
- package/dist/psl-parser.mjs.map +1 -1
- package/dist/psl-parser__format.d.mts +1 -1
- package/dist/psl-parser__format.mjs +3 -3
- package/dist/psl-parser__interpret.d.mts +64 -22
- package/dist/psl-parser__interpret.d.mts.map +1 -1
- package/dist/psl-parser__interpret.mjs +135 -140
- package/dist/psl-parser__interpret.mjs.map +1 -1
- package/dist/psl-parser__syntax.d.mts +1 -1
- package/dist/psl-parser__syntax.mjs +3 -3
- package/dist/psl-printer.d.mts +4 -4
- package/dist/psl-printer.mjs +1 -1
- package/dist/{temporal-type-aliases-C9tIy4rv-Dsun86cY.mjs → temporal-type-aliases-BI3SL5iB-DIP8j4Gv.mjs} +383 -172
- package/dist/temporal-type-aliases-BI3SL5iB-DIP8j4Gv.mjs.map +1 -0
- package/dist/{temporal-type-aliases-BIiamFSH-DLxWO37e.d.mts → temporal-type-aliases-D5QWPhYa-BNKiNvmd.d.mts} +3 -3
- package/dist/{temporal-type-aliases-BIiamFSH-DLxWO37e.d.mts.map → temporal-type-aliases-D5QWPhYa-BNKiNvmd.d.mts.map} +1 -1
- package/dist/type-constructor-calls-Bfg5ojed-DYHnzC9z.mjs +538 -0
- package/dist/type-constructor-calls-Bfg5ojed-DYHnzC9z.mjs.map +1 -0
- package/package.json +15 -15
- package/dist/authoring-4wc_1ETR.mjs.map +0 -1
- package/dist/authoring-D75oR8Nt.d.mts.map +0 -1
- package/dist/control-COPuZO7V.d.mts +0 -1
- package/dist/control-DLpQIwer.mjs.map +0 -1
- package/dist/framework-authoring-ebqZ8M_M-Bdi8MutX.d.mts.map +0 -1
- package/dist/psl-ast-DjTRQDW7.d.mts +0 -2
- package/dist/temporal-type-aliases-C9tIy4rv-Dsun86cY.mjs.map +0 -1
- package/dist/type-constructor-calls-CNd1Xlw2-CfYTYNSm.mjs +0 -306
- package/dist/type-constructor-calls-CNd1Xlw2-CfYTYNSm.mjs.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { v as JsonValue } from "./types-CkFfDIud-C1u8M2UE.mjs";
|
|
2
2
|
import { i as Codec, m as CodecRef, p as CodecLookupWithDescriptors, v as DataTypeId } from "./codec-types-B4wPvO-K-BIPFT7EP.mjs";
|
|
3
3
|
import { r as Result } from "./result-BYCOANWy.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import "./temporal-type-aliases-
|
|
4
|
+
import { $t as instantiateAuthoringTypeConstructor, G as DataTypeSupport, N as AuthoringTypeNamespace, Ot as WrittenValue, _t as PslSpan, j as AuthoringTypeConstructorDescriptor, l as AuthoringEntityContext, st as ParsedPslExtensionBlock, yt as RefusalDescription } from "./authoring-type-choice-CHcRX0RP-CkG1L8a9.mjs";
|
|
5
|
+
import "./temporal-type-aliases-D5QWPhYa-BNKiNvmd.mjs";
|
|
6
6
|
//#region ../../../1-framework/1-core/framework-components/dist/authoring.d.mts
|
|
7
7
|
//#region src/shared/authoring-type-constructor-call.d.ts
|
|
8
8
|
/** What a type constructor call produces for a column. */
|
|
@@ -31,6 +31,58 @@ declare function authoringTypeConstructorArguments(descriptor: AuthoringTypeCons
|
|
|
31
31
|
*/
|
|
32
32
|
declare function findAuthoringTypeConstructorCall(namespace: AuthoringTypeNamespace, output: AuthoringTypeConstructorOutput): AuthoringTypeConstructorCall | undefined;
|
|
33
33
|
//#endregion
|
|
34
|
+
//#region src/shared/authoring-type-choice-call.d.ts
|
|
35
|
+
/** One argument of a type choice call, written by name. */
|
|
36
|
+
interface AuthoringTypeChoiceCallArgument {
|
|
37
|
+
readonly name: string;
|
|
38
|
+
readonly value: unknown;
|
|
39
|
+
}
|
|
40
|
+
/** A type choice, by its path in an authoring namespace, and the arguments of one call to it in the choice's argument order; an argument left out takes its default. */
|
|
41
|
+
interface AuthoringTypeChoiceCall {
|
|
42
|
+
readonly path: readonly string[];
|
|
43
|
+
readonly args: readonly AuthoringTypeChoiceCallArgument[];
|
|
44
|
+
/** The type constructor call the type choice call becomes. */
|
|
45
|
+
readonly becomes: AuthoringTypeConstructorCall;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The call to a type choice that becomes the type constructor call `call`: of the type choices at the constructor's level with a row naming the constructor, the first in namespace order whose call gives the same output. Its options come from that row and its passed-on arguments from the call, and every argument whose omission still gives the same output is left out. `sameOutput` decides what counts as the same output; by default the codec and type parameters must be exactly equal. `undefined` when no type choice names the constructor or no call to one gives the same output.
|
|
49
|
+
*/
|
|
50
|
+
declare function findAuthoringTypeChoiceCall(input: {
|
|
51
|
+
readonly namespace: AuthoringTypeNamespace;
|
|
52
|
+
readonly call: AuthoringTypeConstructorCall;
|
|
53
|
+
readonly sameOutput?: (produced: AuthoringTypeConstructorOutput, wanted: AuthoringTypeConstructorOutput) => boolean;
|
|
54
|
+
}): AuthoringTypeChoiceCall | undefined;
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/shared/data-type-literal.d.ts
|
|
57
|
+
/** What a value is written for: the data type that receives it, that type's parameters, and whether it is a list. */
|
|
58
|
+
interface TypedLiteralOptions {
|
|
59
|
+
/** The stack's data types, whose casts say which other types' values each one takes, with the authoring entries that write them. */
|
|
60
|
+
readonly dataTypes?: DataTypeSupport | undefined;
|
|
61
|
+
/** The data type the value is written in. */
|
|
62
|
+
readonly dataType?: DataTypeId | undefined;
|
|
63
|
+
/** The receiving type's parameters, under which a shorter literal can read back as the stored value, as `-0.5` does on `numeric(65,30)`. */
|
|
64
|
+
readonly typeParams?: unknown;
|
|
65
|
+
/**
|
|
66
|
+
* Whether the value is a list whose elements each carry the receiving data type. Otherwise a
|
|
67
|
+
* written list goes through that type's list cast.
|
|
68
|
+
*/
|
|
69
|
+
readonly list?: boolean;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* `value`, a value of `dataType` as `contract.json` stores it, written as the literal of a type that `dataType` takes, proven to read back as `value`: `255` for `pg/int4`, ``sql`"MyType"[]` `` for `sql/expression`. `undefined` when no literal reads back as it.
|
|
73
|
+
*/
|
|
74
|
+
declare function writeDataTypeValue(value: JsonValue, dataType: DataTypeId, support: DataTypeSupport): string | undefined;
|
|
75
|
+
/** The PSL literal a stored value is written as for the data type `options` describe, or `undefined` when it has no written form that reads back as that value. */
|
|
76
|
+
declare function writeTypedLiteral(value: JsonValue | Date, options: TypedLiteralOptions | undefined): string | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Each argument of a call to `descriptor` as PSL writes it: a value argument as a literal of its data type that reads back as the same value. `undefined` when an argument is not a value argument or no literal reads back as it.
|
|
79
|
+
*/
|
|
80
|
+
declare function writtenTypeArguments(descriptor: AuthoringTypeConstructorDescriptor, args: readonly unknown[], dataTypes: DataTypeSupport): readonly string[] | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* The call to the type constructor `descriptor` at `path` as PSL writes it, with each argument that has a value written by its name as a literal of its data type, and the bare path when none has one. `undefined` when no literal reads back as one of the values.
|
|
83
|
+
*/
|
|
84
|
+
declare function writtenTypeConstructorCall(path: readonly string[], descriptor: AuthoringTypeConstructorDescriptor, args: readonly unknown[], dataTypes: DataTypeSupport): string | undefined;
|
|
85
|
+
//#endregion
|
|
34
86
|
//#region src/shared/discriminator-rule.d.ts
|
|
35
87
|
/** The field a model names as its discriminator, as the rule reads it. */
|
|
36
88
|
interface DiscriminatorField {
|
|
@@ -192,5 +244,5 @@ declare function enumMemberProblemDiagnostic(problem: EnumMemberProblem, site: E
|
|
|
192
244
|
*/
|
|
193
245
|
declare function readEnumBlockMembers(block: ParsedPslExtensionBlock<Readonly<Record<string, unknown>>>, codecId: string, codec: Codec, ctx: AuthoringEntityContext): readonly EnumBlockMember[] | undefined;
|
|
194
246
|
//#endregion
|
|
195
|
-
export {
|
|
196
|
-
//# sourceMappingURL=authoring-
|
|
247
|
+
export { writeTypedLiteral as A, duplicateStoredMembers as C, findAuthoringTypeConstructorCall as D, findAuthoringTypeChoiceCall as E, writtenTypeConstructorCall as M, readEnumBlockMembers as O, describeDiscriminatorRefusal as S, enumMemberProblemDiagnostic as T, StoredEnumMember as _, DecodedEnum as a, authoringTypeConstructorArguments as b, DiscriminatorFieldRefusal as c, DuplicateStoredValue as d, EncodedEnumMember as f, EnumMemberProblem as g, EnumBlockSite as h, AuthoringTypeConstructorOutput as i, writtenTypeArguments as j, writeDataTypeValue as k, DiscriminatorRefusal as l, EnumBlockMember as m, AuthoringTypeChoiceCallArgument as n, DiscriminatorDecision as o, EnumBlockDiagnostic as p, AuthoringTypeConstructorCall as r, DiscriminatorField as s, AuthoringTypeChoiceCall as t, DiscriminatorVariantRefusal as u, TypedLiteralOptions as v, encodeEnumMembers as w, authoringTypeConstructors as x, applyDiscriminatorRule as y };
|
|
248
|
+
//# sourceMappingURL=authoring-BKOoGNxH.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authoring-BKOoGNxH.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/authoring.d.mts"],"mappings":";;;;;;;;KAOK,iCAAiC,kBAAkB;;UAE9C;WACC;WACA;;;iBAGM,0BAA0B,WAAW,wBAAwB,2BAA2B;WAC9F;WACA,YAAY;;;;;;;iBAON,kCAAkC,YAAY,oCAAoC,QAAQ;;;;;;;iBAO1F,iCAAiC,WAAW,wBAAwB,QAAQ,iCAAiC;;;;UAIpH;WACC;WACA;;;UAGD;WACC;WACA,eAAe;;WAEf,SAAS;;;;;iBAKH,4BAA4B;WAClC,WAAW;WACX,MAAM;WACN,cAAc,UAAU,gCAAgC,QAAQ;IACvE;;;;UAIM;;WAEC,YAAY;;WAEZ,WAAW;;WAEX;;;;;WAKA;;;;;iBAKM,mBAAmB,OAAO,WAAW,UAAU,YAAY,SAAS;;iBAEpE,kBAAkB,OAAO,YAAY,MAAM,SAAS;;;;iBAIpD,qBAAqB,YAAY,oCAAoC,0BAA0B,WAAW;;;;iBAI1G,2BAA2B,yBAAyB,YAAY,oCAAoC,0BAA0B,WAAW;;;;UAIhJ;;WAEC,KAAK;WACL;WACA;;WAEA,sBAAsB;;;KAG5B,qBAAqB;WACf;;WAEA;;WAEA;WACA,UAAU;WACV,wBAAwB;;WAExB;WACA,KAAK;WACL,QAAQ;WACR,kBAAkB;;;;;iBAKZ,6BAA6B,KAAK,SAAS,qBAAqB,MAAM;WAC5E;WACA;;WAEA;;WAEA;WACA,cAAc,KAAK;;;KAGzB,4BAA4B,QAAQ;WAC9B;;;KAGN,4BAA4B;WACtB;WACA,KAAK;WACL,SAAS;IAChB,QAAQ,qBAAqB;WACtB;;;UAGD,sBAAsB;;WAErB,wBAAwB;;WAExB,0BAA0B,4BAA4B;;WAEtD,QAAQ,YAAY;;;;;iBAKd,uBAAuB,KAAK;WAClC,OAAO;WACP;aACE,KAAK;aACL,SAAS;;WAEX;WACA,aAAa,KAAK;WAClB,WAAW;IAClB,sBAAsB;;;UAGhB;WACC;WACA,QAAQ;;UAET;WACC;WACA;WACA,QAAQ;;WAER,gBAAgB;;;;;iBAKV,uBAAuB,kBAAkB,oBAAoB,eAAe,MAAM,gCAAgC;;;;UAIzH;WACC;WACA;aACE;aACA;;;;UAIH;WACC;WACA,OAAO;;UAER;WACC;WACA;WACA;WACA;;UAED;WACC;WACA;WACA;WACA,QAAQ;WACR;;KAEN;WACM;WACA;;WAEA;IACP,qBAAqB;WACd;IACP;;;;iBAIa,kBAAkB,aAAa,aAAa,aAAa,6BAA6B,gBAAgB,8BAA8B;;;UAG3I;WACC;WACA;;UAED;WACC;WACA;WACA;WACA,MAAM;;;;;UAKP;WACC;WACA;WACA;WACA,MAAM;WACN,aAAa,SAAS,eAAe;;;;;iBAK/B,4BAA4B,SAAS,mBAAmB,MAAM,gBAAgB;;;;;;iBAM9E,qBAAqB,OAAO,wBAAwB,SAAS,2BAA2B,iBAAiB,OAAO,OAAO,KAAK,kCAAkC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
|
|
1
2
|
import { t as canonicalStringify } from "./canonical-stringify-DY4NaAJi.mjs";
|
|
2
3
|
import { r as isInternalError, t as InternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
|
|
3
4
|
import { n as notOk, r as ok } from "./result-8OXF26MN.mjs";
|
|
4
5
|
import { t as canonicalizeJson } from "./canonicalize-json-ZPawceQR-Dua1VNEB.mjs";
|
|
5
6
|
import { d as dataTypeParams, u as dataTypeId } from "./data-type-DPsP4_9m-BRPJX_-z.mjs";
|
|
6
7
|
import { r as codecForRef } from "./resolve-codec-qqMjZrmn-Cok8elAo.mjs";
|
|
7
|
-
import {
|
|
8
|
+
import { B as resolveAuthoringTypeChoice, C as instantiateAuthoringTypeCall, E as isAuthoringArgRef, L as printTaggedLiteral, M as isAuthoringTypeChoiceOption, N as isAuthoringTypeConstructorDescriptor, P as isAuthoringTypeDescriptor, R as printedTaggedLiteralReadsBack, X as typeConstructorLookup, d as authoringTypeNamespaceLevel, j as isAuthoringTypeChoiceDescriptor, w as instantiateAuthoringTypeConstructor } from "./temporal-type-aliases-BI3SL5iB-DIP8j4Gv.mjs";
|
|
8
9
|
import { a as numeralText, i as enumRefusalOf, o as readContractValue } from "./codec-descriptor-BNc32mKN-mmex2e4w.mjs";
|
|
9
10
|
//#region ../../../1-framework/1-core/framework-components/dist/authoring.mjs
|
|
10
11
|
/** Every type constructor of `namespace`, with its path, in namespace order. */
|
|
@@ -13,9 +14,10 @@ function* authoringTypeConstructors(namespace, path = []) {
|
|
|
13
14
|
path: [...path, name],
|
|
14
15
|
descriptor: value
|
|
15
16
|
};
|
|
16
|
-
else if (!
|
|
17
|
+
else if (!isAuthoringTypeDescriptor(value)) yield* authoringTypeConstructors(value, [...path, name]);
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
+
/** Whether `produced` is exactly `wanted`: the same codec and the same type parameters, an absent set of parameters counting as an empty one. */
|
|
20
|
+
function sameAuthoringTypeConstructorOutput(produced, wanted) {
|
|
19
21
|
const wantedFields = {
|
|
20
22
|
...wanted,
|
|
21
23
|
typeParams: wanted.typeParams ?? {}
|
|
@@ -40,7 +42,7 @@ function authoringTypeConstructorArguments(descriptor, output) {
|
|
|
40
42
|
const requiredArgs = (descriptor.args ?? []).filter((arg) => arg.optional !== true).length;
|
|
41
43
|
if (args.length < requiredArgs || Array.from(args).includes(void 0)) return void 0;
|
|
42
44
|
try {
|
|
43
|
-
return
|
|
45
|
+
return sameAuthoringTypeConstructorOutput(instantiateAuthoringTypeConstructor(descriptor, args), output) ? args : void 0;
|
|
44
46
|
} catch {
|
|
45
47
|
return;
|
|
46
48
|
}
|
|
@@ -60,37 +62,81 @@ function findAuthoringTypeConstructorCall(namespace, output) {
|
|
|
60
62
|
};
|
|
61
63
|
}
|
|
62
64
|
}
|
|
63
|
-
function
|
|
64
|
-
return
|
|
65
|
+
function choicesNaming(level, constructorName) {
|
|
66
|
+
return Object.entries(level).flatMap(([name, member]) => {
|
|
67
|
+
if (!isAuthoringTypeChoiceDescriptor(member)) return [];
|
|
68
|
+
const row = member.choices.find((candidate) => candidate.type === constructorName);
|
|
69
|
+
return row === void 0 ? [] : [{
|
|
70
|
+
name,
|
|
71
|
+
descriptor: member,
|
|
72
|
+
when: row.when
|
|
73
|
+
}];
|
|
74
|
+
});
|
|
65
75
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
76
|
+
function outputOf(produce) {
|
|
77
|
+
try {
|
|
78
|
+
return produce();
|
|
79
|
+
} catch (error) {
|
|
80
|
+
if (isInternalError(error)) throw error;
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
69
83
|
}
|
|
70
84
|
/**
|
|
71
|
-
*
|
|
85
|
+
* The call to a type choice that becomes the type constructor call `call`: of the type choices at the constructor's level with a row naming the constructor, the first in namespace order whose call gives the same output. Its options come from that row and its passed-on arguments from the call, and every argument whose omission still gives the same output is left out. `sameOutput` decides what counts as the same output; by default the codec and type parameters must be exactly equal. `undefined` when no type choice names the constructor or no call to one gives the same output.
|
|
72
86
|
*/
|
|
73
|
-
function
|
|
74
|
-
const
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
function findAuthoringTypeChoiceCall(input) {
|
|
88
|
+
const { call } = input;
|
|
89
|
+
const sameOutput = input.sameOutput ?? sameAuthoringTypeConstructorOutput;
|
|
90
|
+
const prefix = call.path.slice(0, -1);
|
|
91
|
+
const constructorName = call.path.at(-1);
|
|
92
|
+
const level = authoringTypeNamespaceLevel(input.namespace, prefix);
|
|
93
|
+
if (level === void 0 || constructorName === void 0) return void 0;
|
|
94
|
+
const explicit = typeConstructorLookup(level)(constructorName);
|
|
95
|
+
const wanted = explicit && outputOf(() => instantiateAuthoringTypeConstructor(explicit, call.args));
|
|
96
|
+
if (explicit === void 0 || wanted === void 0) return void 0;
|
|
97
|
+
const passedValue = (name) => call.args[(explicit.args ?? []).findIndex((parameter) => parameter.name === name)];
|
|
98
|
+
for (const choice of choicesNaming(level, constructorName)) {
|
|
99
|
+
const found = choiceCallReproducing({
|
|
100
|
+
level,
|
|
101
|
+
prefix,
|
|
102
|
+
choice,
|
|
103
|
+
passedValue,
|
|
104
|
+
reproduces: (produced) => sameOutput(produced, wanted)
|
|
91
105
|
});
|
|
106
|
+
if (found !== void 0) return found;
|
|
92
107
|
}
|
|
93
|
-
|
|
108
|
+
}
|
|
109
|
+
function choiceCallReproducing(input) {
|
|
110
|
+
const { level, prefix, choice } = input;
|
|
111
|
+
const reproduces = (args) => {
|
|
112
|
+
const produced = outputOf(() => instantiateAuthoringTypeCall(level, choice.name, args));
|
|
113
|
+
return produced !== void 0 && input.reproduces(produced);
|
|
114
|
+
};
|
|
115
|
+
const args = choice.descriptor.args.map((argument) => isAuthoringTypeChoiceOption(argument) ? choice.when[argument.name] : input.passedValue(argument.name));
|
|
116
|
+
if (!reproduces(args)) return void 0;
|
|
117
|
+
for (const index of args.keys()) {
|
|
118
|
+
const without = args.map((value, at) => at === index ? void 0 : value);
|
|
119
|
+
if (args[index] !== void 0 && reproduces(without)) args[index] = void 0;
|
|
120
|
+
}
|
|
121
|
+
const chosen = resolveAuthoringTypeChoice({
|
|
122
|
+
helperPath: choice.name,
|
|
123
|
+
descriptor: choice.descriptor,
|
|
124
|
+
args,
|
|
125
|
+
constructorNamed: typeConstructorLookup(level)
|
|
126
|
+
});
|
|
127
|
+
const chosenArgs = [...chosen.args];
|
|
128
|
+
while (chosenArgs.length > 0 && chosenArgs.at(-1) === void 0) chosenArgs.pop();
|
|
129
|
+
return {
|
|
130
|
+
path: [...prefix, choice.name],
|
|
131
|
+
args: choice.descriptor.args.flatMap((argument, index) => args[index] === void 0 ? [] : [{
|
|
132
|
+
name: argument.name,
|
|
133
|
+
value: args[index]
|
|
134
|
+
}]),
|
|
135
|
+
becomes: {
|
|
136
|
+
path: [...prefix, chosen.type],
|
|
137
|
+
args: chosenArgs
|
|
138
|
+
}
|
|
139
|
+
};
|
|
94
140
|
}
|
|
95
141
|
/**
|
|
96
142
|
* Words a refusal of the cast rule. The message leads with what to write; the types are named only when the value has a form the position admits and its type is still refused, such as a number too large for the receiving type.
|
|
@@ -427,6 +473,306 @@ function joinForms(forms) {
|
|
|
427
473
|
function describeAdmittedForms(support, dataType) {
|
|
428
474
|
return joinForms(admittedForms(support, [dataType]));
|
|
429
475
|
}
|
|
476
|
+
/** A string as a contract source writes it, with the escapes its string reader resolves. */
|
|
477
|
+
function escapePslString(value) {
|
|
478
|
+
return value.replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\n/g, "\\n").replace(/\r/g, "\\r");
|
|
479
|
+
}
|
|
480
|
+
function writingSurface(support) {
|
|
481
|
+
const entryOf = /* @__PURE__ */ new Map();
|
|
482
|
+
const tagTypes = [];
|
|
483
|
+
for (const [key, entry] of Object.entries(support.entries)) {
|
|
484
|
+
const written = entry.written;
|
|
485
|
+
if (written.kind === "tag") {
|
|
486
|
+
const type = dataTypeId(key);
|
|
487
|
+
if (!entryOf.has(type)) entryOf.set(type, entry);
|
|
488
|
+
tagTypes.push(type);
|
|
489
|
+
continue;
|
|
490
|
+
}
|
|
491
|
+
if (written.syntax === "number") {
|
|
492
|
+
for (const type of written.types) entryOf.set(type, entry);
|
|
493
|
+
continue;
|
|
494
|
+
}
|
|
495
|
+
entryOf.set(key, entry);
|
|
496
|
+
}
|
|
497
|
+
return {
|
|
498
|
+
support,
|
|
499
|
+
entryOf,
|
|
500
|
+
tagTypes
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
function readValue(surface, written) {
|
|
504
|
+
const read = readWrittenValue(surface.support, written);
|
|
505
|
+
return read.ok ? read.value : void 0;
|
|
506
|
+
}
|
|
507
|
+
/** The value of a tag's type that a stored document is, constructed by that type. */
|
|
508
|
+
function tagValue(surface, type, value) {
|
|
509
|
+
try {
|
|
510
|
+
return surface.support.lookup.get(type)?.valueFrom(value, {});
|
|
511
|
+
} catch (error) {
|
|
512
|
+
if (isInternalError(error)) throw error;
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* Every value the stored form could be, in the order a written value would be read: a number or
|
|
518
|
+
* numeral text through the number entry first, then the plain syntax that matches the shape, then
|
|
519
|
+
* each tag, whose stored form is a whole document, which may itself be a number or a boolean.
|
|
520
|
+
*/
|
|
521
|
+
function classifications(value, surface) {
|
|
522
|
+
const found = [];
|
|
523
|
+
if (typeof value === "number") found.push(readValue(surface, {
|
|
524
|
+
kind: "number",
|
|
525
|
+
text: numeralText(value)
|
|
526
|
+
}));
|
|
527
|
+
else if (typeof value === "boolean") found.push(readValue(surface, {
|
|
528
|
+
kind: "boolean",
|
|
529
|
+
value
|
|
530
|
+
}));
|
|
531
|
+
else if (typeof value === "string") {
|
|
532
|
+
found.push(readValue(surface, {
|
|
533
|
+
kind: "number",
|
|
534
|
+
text: value
|
|
535
|
+
}));
|
|
536
|
+
found.push(readValue(surface, {
|
|
537
|
+
kind: "string",
|
|
538
|
+
text: value
|
|
539
|
+
}));
|
|
540
|
+
}
|
|
541
|
+
for (const type of surface.tagTypes) found.push(tagValue(surface, type, value));
|
|
542
|
+
return found.filter((candidate) => candidate !== void 0);
|
|
543
|
+
}
|
|
544
|
+
/** What the receiving type stores for `json` under its parameters, or `undefined` when it holds no such value. */
|
|
545
|
+
function storedUnder(json, receiver, lookup) {
|
|
546
|
+
const type = lookup.get(receiver.id);
|
|
547
|
+
if (type === void 0) return void 0;
|
|
548
|
+
try {
|
|
549
|
+
return type.toContract(type.valueFrom(json, receiver.params));
|
|
550
|
+
} catch (error) {
|
|
551
|
+
if (isInternalError(error)) throw error;
|
|
552
|
+
return;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
/** The stored form the receiving type takes this value as, spelled as its parameters give it, or `undefined` when its type takes no such value. */
|
|
556
|
+
function admitted(candidate, receiver, surface) {
|
|
557
|
+
const cast = castTypedValue(surface.support, receiver.id, receiver.params, candidate);
|
|
558
|
+
return cast.ok ? cast.value.value : void 0;
|
|
559
|
+
}
|
|
560
|
+
/** The text of the literal: what the entry prints, before the syntax that fences it. */
|
|
561
|
+
function printedText(entry, value) {
|
|
562
|
+
try {
|
|
563
|
+
return entry.print(value);
|
|
564
|
+
} catch {
|
|
565
|
+
return;
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
/** The printed text as the entry's syntax writes it, for reading back. */
|
|
569
|
+
function writtenAs(entry, text) {
|
|
570
|
+
const written = entry.written;
|
|
571
|
+
if (written.kind === "tag") return {
|
|
572
|
+
kind: "tag",
|
|
573
|
+
tag: written.tag,
|
|
574
|
+
text
|
|
575
|
+
};
|
|
576
|
+
if (written.syntax !== "boolean") return {
|
|
577
|
+
kind: written.syntax,
|
|
578
|
+
text
|
|
579
|
+
};
|
|
580
|
+
return text === "true" || text === "false" ? {
|
|
581
|
+
kind: "boolean",
|
|
582
|
+
value: text === "true"
|
|
583
|
+
} : void 0;
|
|
584
|
+
}
|
|
585
|
+
/** What the printed text reads back as, through the same read a written value takes. */
|
|
586
|
+
function readBack(surface, entry, text) {
|
|
587
|
+
const written = writtenAs(entry, text);
|
|
588
|
+
return written === void 0 ? void 0 : readValue(surface, written);
|
|
589
|
+
}
|
|
590
|
+
function literalText(entry, text) {
|
|
591
|
+
const written = entry.written;
|
|
592
|
+
if (written.kind === "tag") return printTaggedLiteral(written.tag, text);
|
|
593
|
+
return written.syntax === "string" ? `"${escapePslString(text)}"` : text;
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* The value written as the literal of one of its types, proven by reading the text straight back:
|
|
597
|
+
* the same read, the same cast, and the stored form again. A number is tried first without the
|
|
598
|
+
* trailing fraction zeros the receiving type's scale spells it with.
|
|
599
|
+
*/
|
|
600
|
+
function writeScalar(value, receiver, surface) {
|
|
601
|
+
const shortest = withoutTrailingFractionZeros(value);
|
|
602
|
+
const candidates = [...shortest === void 0 ? [] : classifications(shortest, surface), ...classifications(value, surface)];
|
|
603
|
+
for (const candidate of candidates) {
|
|
604
|
+
const entry = surface.entryOf.get(candidate.type);
|
|
605
|
+
if (entry === void 0) continue;
|
|
606
|
+
const stored = admitted(candidate, receiver, surface);
|
|
607
|
+
if (stored === void 0 || !sameForm(stored, value)) continue;
|
|
608
|
+
const text = printedText(entry, candidate.value);
|
|
609
|
+
if (text === void 0) continue;
|
|
610
|
+
const reread = readBack(surface, entry, text);
|
|
611
|
+
if (reread === void 0) continue;
|
|
612
|
+
const restored = admitted(reread, receiver, surface);
|
|
613
|
+
if (restored === void 0 || !sameForm(restored, value)) continue;
|
|
614
|
+
return literalText(entry, text);
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* `value`, a value of `dataType` as `contract.json` stores it, written as the literal of a type that `dataType` takes, proven to read back as `value`: `255` for `pg/int4`, ``sql`"MyType"[]` `` for `sql/expression`. `undefined` when no literal reads back as it.
|
|
619
|
+
*/
|
|
620
|
+
function writeDataTypeValue(value, dataType, support) {
|
|
621
|
+
return writeScalar(value, {
|
|
622
|
+
id: dataType,
|
|
623
|
+
params: {}
|
|
624
|
+
}, writingSurface(support));
|
|
625
|
+
}
|
|
626
|
+
const DECIMAL_WITH_FRACTION = /^-?\d+\.\d+$/;
|
|
627
|
+
function withoutTrailingFractionZeros(value) {
|
|
628
|
+
if (typeof value !== "string" || !DECIMAL_WITH_FRACTION.test(value)) return void 0;
|
|
629
|
+
const shortened = value.replace(/0+$/, "").replace(/\.$/, "");
|
|
630
|
+
return shortened === value ? void 0 : shortened;
|
|
631
|
+
}
|
|
632
|
+
/** One written element of a list, printed as a value of any type, with no receiving type to admit it. */
|
|
633
|
+
function writeElement(value, of, surface) {
|
|
634
|
+
for (const candidate of classifications(value, surface)) {
|
|
635
|
+
if (!of.includes(candidate.type)) continue;
|
|
636
|
+
const entry = surface.entryOf.get(candidate.type);
|
|
637
|
+
if (entry === void 0) continue;
|
|
638
|
+
const text = printedText(entry, candidate.value);
|
|
639
|
+
if (text === void 0) continue;
|
|
640
|
+
const reread = readBack(surface, entry, text);
|
|
641
|
+
if (reread === void 0 || !of.includes(reread.type)) continue;
|
|
642
|
+
return {
|
|
643
|
+
text: literalText(entry, text),
|
|
644
|
+
value: reread.value
|
|
645
|
+
};
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
/**
|
|
649
|
+
* A written list for a scalar data type, which that type's list cast turns into its one value,
|
|
650
|
+
* constructed by the type. Each element is classified on its own and must be of a type the
|
|
651
|
+
* cast takes.
|
|
652
|
+
*/
|
|
653
|
+
function writeListCast(value, receiver, surface) {
|
|
654
|
+
const listCast = surface.support.lookup.get(receiver.id)?.listCast;
|
|
655
|
+
if (listCast === void 0) return void 0;
|
|
656
|
+
const parts = [];
|
|
657
|
+
const elements = [];
|
|
658
|
+
for (const element of value) {
|
|
659
|
+
const written = writeElement(element, listCast.of, surface);
|
|
660
|
+
if (written === void 0) return void 0;
|
|
661
|
+
parts.push(written.text);
|
|
662
|
+
elements.push(written.value);
|
|
663
|
+
}
|
|
664
|
+
let cast;
|
|
665
|
+
try {
|
|
666
|
+
cast = listCast.cast(elements);
|
|
667
|
+
} catch (error) {
|
|
668
|
+
if (isInternalError(error)) throw error;
|
|
669
|
+
return;
|
|
670
|
+
}
|
|
671
|
+
const stored = storedUnder(cast, receiver, surface.support.lookup);
|
|
672
|
+
return stored !== void 0 && sameForm(stored, value) ? `[${parts.join(", ")}]` : void 0;
|
|
673
|
+
}
|
|
674
|
+
/** The PSL literal a stored value is written as for the data type `options` describe, or `undefined` when it has no written form that reads back as that value. */
|
|
675
|
+
function writeTypedLiteral(value, options) {
|
|
676
|
+
if (value instanceof Date) return void 0;
|
|
677
|
+
const { dataTypes, dataType } = options ?? {};
|
|
678
|
+
if (dataTypes === void 0 || dataType === void 0) return void 0;
|
|
679
|
+
const { lookup } = dataTypes;
|
|
680
|
+
const receivingType = lookup.get(dataType);
|
|
681
|
+
const receiver = {
|
|
682
|
+
id: dataType,
|
|
683
|
+
params: receivingType === void 0 ? {} : dataTypeParams(receivingType, options?.typeParams)
|
|
684
|
+
};
|
|
685
|
+
const surface = writingSurface(dataTypes);
|
|
686
|
+
if (options?.list === true) {
|
|
687
|
+
if (!Array.isArray(value)) return void 0;
|
|
688
|
+
const parts = [];
|
|
689
|
+
for (const element of value) {
|
|
690
|
+
const written = writeScalar(element, receiver, surface);
|
|
691
|
+
if (written === void 0) return void 0;
|
|
692
|
+
parts.push(written);
|
|
693
|
+
}
|
|
694
|
+
return `[${parts.join(", ")}]`;
|
|
695
|
+
}
|
|
696
|
+
const written = writeScalar(value, receiver, surface);
|
|
697
|
+
if (written !== void 0) return written;
|
|
698
|
+
return Array.isArray(value) ? writeListCast(value, receiver, surface) : void 0;
|
|
699
|
+
}
|
|
700
|
+
/** Whether two stored forms are the same JSON value, member by member and element by element. */
|
|
701
|
+
function sameForm(left, right) {
|
|
702
|
+
if (left === right) return true;
|
|
703
|
+
if (Array.isArray(left) !== Array.isArray(right)) return false;
|
|
704
|
+
if (typeof left !== "object" || typeof right !== "object" || left === null || right === null) return false;
|
|
705
|
+
const members = Object.entries(left);
|
|
706
|
+
const others = new Map(Object.entries(right));
|
|
707
|
+
return members.length === others.size && members.every(([key, member]) => {
|
|
708
|
+
const other = others.get(key);
|
|
709
|
+
return other !== void 0 && sameForm(member, other);
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
/** A value argument of a type constructor, written as a literal of its data type. */
|
|
713
|
+
function writtenArgument(argument, value, dataTypes) {
|
|
714
|
+
return writeDataTypeValue(blindCast(value), dataTypeId(argument.dataType), dataTypes);
|
|
715
|
+
}
|
|
716
|
+
/**
|
|
717
|
+
* Each argument of a call to `descriptor` as PSL writes it: a value argument as a literal of its data type that reads back as the same value. `undefined` when an argument is not a value argument or no literal reads back as it.
|
|
718
|
+
*/
|
|
719
|
+
function writtenTypeArguments(descriptor, args, dataTypes) {
|
|
720
|
+
const written = [];
|
|
721
|
+
for (const [index, value] of args.entries()) {
|
|
722
|
+
const argument = descriptor.args?.[index];
|
|
723
|
+
const text = argument && writtenArgument(argument, value, dataTypes);
|
|
724
|
+
if (text === void 0) return void 0;
|
|
725
|
+
written.push(text);
|
|
726
|
+
}
|
|
727
|
+
return written;
|
|
728
|
+
}
|
|
729
|
+
/**
|
|
730
|
+
* The call to the type constructor `descriptor` at `path` as PSL writes it, with each argument that has a value written by its name as a literal of its data type, and the bare path when none has one. `undefined` when no literal reads back as one of the values.
|
|
731
|
+
*/
|
|
732
|
+
function writtenTypeConstructorCall(path, descriptor, args, dataTypes) {
|
|
733
|
+
const written = [];
|
|
734
|
+
for (const [index, argument] of (descriptor.args ?? []).entries()) {
|
|
735
|
+
const value = args[index];
|
|
736
|
+
if (value === void 0) continue;
|
|
737
|
+
const text = writtenArgument(argument, value, dataTypes);
|
|
738
|
+
if (text === void 0) return void 0;
|
|
739
|
+
written.push(argument.name === void 0 ? text : `${argument.name}: ${text}`);
|
|
740
|
+
}
|
|
741
|
+
const name = path.join(".");
|
|
742
|
+
return written.length === 0 ? name : `${name}(${written.join(", ")})`;
|
|
743
|
+
}
|
|
744
|
+
function storedFormOf(stored) {
|
|
745
|
+
return canonicalStringify(JSON.parse(JSON.stringify(stored)));
|
|
746
|
+
}
|
|
747
|
+
/** The key two stored values are equal by: the data type's `equalityKey` when it declares one, else the stored form as `contract.json` holds it, compared by `canonicalStringify`. */
|
|
748
|
+
function storedValueKey(stored, equalityKey) {
|
|
749
|
+
return equalityKey?.(stored) ?? storedFormOf(stored);
|
|
750
|
+
}
|
|
751
|
+
/**
|
|
752
|
+
* Each enum member whose stored form equals an earlier member's, paired with the first such member. Stored forms are compared as `contract.json` holds them, so negative zero is zero, and by `canonicalStringify`, so two objects with the same entries in a different order are equal; or, when the enum's data type declares an `equalityKey`, by that key, so `0.5` and `0.50` are one `numeric` value. Every enum authoring surface refuses the members this returns.
|
|
753
|
+
*/
|
|
754
|
+
function duplicateStoredMembers(members, equalityKey) {
|
|
755
|
+
const memberByKey = /* @__PURE__ */ new Map();
|
|
756
|
+
const duplicates = [];
|
|
757
|
+
for (const member of members) {
|
|
758
|
+
const { name, stored } = member;
|
|
759
|
+
const key = storedValueKey(stored, equalityKey);
|
|
760
|
+
const earlier = memberByKey.get(key);
|
|
761
|
+
if (earlier === void 0) memberByKey.set(key, member);
|
|
762
|
+
else if (storedFormOf(earlier.stored) === storedFormOf(stored)) duplicates.push({
|
|
763
|
+
earlier: earlier.name,
|
|
764
|
+
later: name,
|
|
765
|
+
stored
|
|
766
|
+
});
|
|
767
|
+
else duplicates.push({
|
|
768
|
+
earlier: earlier.name,
|
|
769
|
+
later: name,
|
|
770
|
+
stored,
|
|
771
|
+
earlierStored: earlier.stored
|
|
772
|
+
});
|
|
773
|
+
}
|
|
774
|
+
return duplicates;
|
|
775
|
+
}
|
|
430
776
|
/**
|
|
431
777
|
* The refusals of a discriminator: the field must be required, hold one value, and have one of the stack's text data types; and when an enum types it, each variant's value, as the field stores it, must be one of the enum's members, compared by the field's data type's equality. Returns no refusals for a discriminator that is valid.
|
|
432
778
|
*/
|
|
@@ -737,6 +1083,6 @@ function encodeEnumMembers(decodedEnum, codecLookup) {
|
|
|
737
1083
|
return problems.length > 0 ? notOk(problems) : ok(members);
|
|
738
1084
|
}
|
|
739
1085
|
//#endregion
|
|
740
|
-
export {
|
|
1086
|
+
export { readWrittenValueAs as C, writeTypedLiteral as D, writeDataTypeValue as E, writtenTypeArguments as O, readWrittenValue as S, tagForm as T, exactRewrite as _, authoringTypeConstructors as a, knownTags as b, describeDiscriminatorRefusal as c, describeRefusedValueType as d, duplicateStoredMembers as f, enumMemberProblemDiagnostic as g, entryForTag as h, authoringTypeConstructorArguments as i, writtenTypeConstructorCall as k, describeExpected as l, entryForPlain as m, admittedTags as n, castTypedValue as o, encodeEnumMembers as p, applyDiscriminatorRule as r, describeAdmittedForms as s, admittedForms as t, describeRefusal as u, findAuthoringTypeChoiceCall as v, readWrittenValueIntoCodec as w, readEnumBlockMembers as x, findAuthoringTypeConstructorCall as y };
|
|
741
1087
|
|
|
742
|
-
//# sourceMappingURL=authoring-
|
|
1088
|
+
//# sourceMappingURL=authoring-CcfXu8Dz.mjs.map
|