@formspec/build 0.1.0-alpha.21 → 0.1.0-alpha.23
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/README.md +9 -4
- package/dist/analyzer/class-analyzer.d.ts +1 -1
- package/dist/analyzer/class-analyzer.d.ts.map +1 -1
- package/dist/analyzer/jsdoc-constraints.d.ts +1 -1
- package/dist/analyzer/jsdoc-constraints.d.ts.map +1 -1
- package/dist/analyzer/tsdoc-parser.d.ts +1 -1
- package/dist/analyzer/tsdoc-parser.d.ts.map +1 -1
- package/dist/browser.cjs +5 -4
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.js +4 -3
- package/dist/browser.js.map +1 -1
- package/dist/build-alpha.d.ts +836 -0
- package/dist/build-beta.d.ts +836 -0
- package/dist/build-internal.d.ts +836 -0
- package/dist/build.d.ts +157 -538
- package/dist/canonicalize/chain-dsl-canonicalizer.d.ts +2 -1
- package/dist/canonicalize/chain-dsl-canonicalizer.d.ts.map +1 -1
- package/dist/canonicalize/tsdoc-canonicalizer.d.ts +1 -1
- package/dist/canonicalize/tsdoc-canonicalizer.d.ts.map +1 -1
- package/dist/cli.cjs +82 -126
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +72 -116
- package/dist/cli.js.map +1 -1
- package/dist/generators/class-schema.d.ts +20 -3
- package/dist/generators/class-schema.d.ts.map +1 -1
- package/dist/generators/mixed-authoring.d.ts +3 -2
- package/dist/generators/mixed-authoring.d.ts.map +1 -1
- package/dist/index.cjs +79 -127
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +72 -101
- package/dist/index.js.map +1 -1
- package/dist/internals.cjs +77 -15
- package/dist/internals.cjs.map +1 -1
- package/dist/internals.d.ts +2 -1
- package/dist/internals.d.ts.map +1 -1
- package/dist/internals.js +69 -7
- package/dist/internals.js.map +1 -1
- package/dist/json-schema/generator.d.ts +8 -4
- package/dist/json-schema/generator.d.ts.map +1 -1
- package/dist/json-schema/ir-generator.d.ts +4 -4
- package/dist/json-schema/ir-generator.d.ts.map +1 -1
- package/dist/json-schema/schema.d.ts +2 -2
- package/dist/json-schema/types.d.ts +6 -6
- package/dist/ui-schema/ir-generator.d.ts +1 -1
- package/dist/ui-schema/ir-generator.d.ts.map +1 -1
- package/dist/ui-schema/schema.d.ts +28 -28
- package/dist/ui-schema/types.d.ts +152 -3
- package/dist/ui-schema/types.d.ts.map +1 -1
- package/dist/validate/constraint-validator.d.ts +1 -1
- package/dist/validate/constraint-validator.d.ts.map +1 -1
- package/package.json +8 -8
- package/dist/__tests__/alias-chain-propagation.test.d.ts +0 -9
- package/dist/__tests__/alias-chain-propagation.test.d.ts.map +0 -1
- package/dist/__tests__/chain-dsl-canonicalizer.test.d.ts +0 -2
- package/dist/__tests__/chain-dsl-canonicalizer.test.d.ts.map +0 -1
- package/dist/__tests__/class-schema.test.d.ts +0 -2
- package/dist/__tests__/class-schema.test.d.ts.map +0 -1
- package/dist/__tests__/cli.test.d.ts +0 -2
- package/dist/__tests__/cli.test.d.ts.map +0 -1
- package/dist/__tests__/constraint-validator.test.d.ts +0 -2
- package/dist/__tests__/constraint-validator.test.d.ts.map +0 -1
- package/dist/__tests__/date-extension.integration.test.d.ts +0 -2
- package/dist/__tests__/date-extension.integration.test.d.ts.map +0 -1
- package/dist/__tests__/edge-cases.test.d.ts +0 -7
- package/dist/__tests__/edge-cases.test.d.ts.map +0 -1
- package/dist/__tests__/extension-api.test.d.ts +0 -2
- package/dist/__tests__/extension-api.test.d.ts.map +0 -1
- package/dist/__tests__/extension-runtime.integration.test.d.ts +0 -2
- package/dist/__tests__/extension-runtime.integration.test.d.ts.map +0 -1
- package/dist/__tests__/fixtures/alias-chains.d.ts +0 -37
- package/dist/__tests__/fixtures/alias-chains.d.ts.map +0 -1
- package/dist/__tests__/fixtures/class-schema-regressions.d.ts +0 -86
- package/dist/__tests__/fixtures/class-schema-regressions.d.ts.map +0 -1
- package/dist/__tests__/fixtures/edge-cases.d.ts +0 -132
- package/dist/__tests__/fixtures/edge-cases.d.ts.map +0 -1
- package/dist/__tests__/fixtures/example-a-builtins.d.ts +0 -31
- package/dist/__tests__/fixtures/example-a-builtins.d.ts.map +0 -1
- package/dist/__tests__/fixtures/example-date-extension.d.ts +0 -12
- package/dist/__tests__/fixtures/example-date-extension.d.ts.map +0 -1
- package/dist/__tests__/fixtures/example-interface-types.d.ts +0 -107
- package/dist/__tests__/fixtures/example-interface-types.d.ts.map +0 -1
- package/dist/__tests__/fixtures/example-numeric-extension.d.ts +0 -20
- package/dist/__tests__/fixtures/example-numeric-extension.d.ts.map +0 -1
- package/dist/__tests__/fixtures/extension-forms.d.ts +0 -7
- package/dist/__tests__/fixtures/extension-forms.d.ts.map +0 -1
- package/dist/__tests__/fixtures/mixed-authoring-shipping-address.d.ts +0 -31
- package/dist/__tests__/fixtures/mixed-authoring-shipping-address.d.ts.map +0 -1
- package/dist/__tests__/fixtures/named-primitive-aliases.d.ts +0 -15
- package/dist/__tests__/fixtures/named-primitive-aliases.d.ts.map +0 -1
- package/dist/__tests__/fixtures/nested-array-path-constraints.d.ts +0 -14
- package/dist/__tests__/fixtures/nested-array-path-constraints.d.ts.map +0 -1
- package/dist/__tests__/fixtures/sample-forms.d.ts +0 -65
- package/dist/__tests__/fixtures/sample-forms.d.ts.map +0 -1
- package/dist/__tests__/generate-schemas.test.d.ts +0 -2
- package/dist/__tests__/generate-schemas.test.d.ts.map +0 -1
- package/dist/__tests__/generator.test.d.ts +0 -2
- package/dist/__tests__/generator.test.d.ts.map +0 -1
- package/dist/__tests__/guards.test.d.ts +0 -2
- package/dist/__tests__/guards.test.d.ts.map +0 -1
- package/dist/__tests__/integration.test.d.ts +0 -8
- package/dist/__tests__/integration.test.d.ts.map +0 -1
- package/dist/__tests__/ir-analyzer.test.d.ts +0 -11
- package/dist/__tests__/ir-analyzer.test.d.ts.map +0 -1
- package/dist/__tests__/ir-jsdoc-constraints.test.d.ts +0 -12
- package/dist/__tests__/ir-jsdoc-constraints.test.d.ts.map +0 -1
- package/dist/__tests__/ir-json-schema-generator.test.d.ts +0 -11
- package/dist/__tests__/ir-json-schema-generator.test.d.ts.map +0 -1
- package/dist/__tests__/ir-ui-schema-generator.test.d.ts +0 -2
- package/dist/__tests__/ir-ui-schema-generator.test.d.ts.map +0 -1
- package/dist/__tests__/mixed-authoring.test.d.ts +0 -2
- package/dist/__tests__/mixed-authoring.test.d.ts.map +0 -1
- package/dist/__tests__/numeric-extension.integration.test.d.ts +0 -2
- package/dist/__tests__/numeric-extension.integration.test.d.ts.map +0 -1
- package/dist/__tests__/parity/fixtures/address/chain-dsl.d.ts +0 -9
- package/dist/__tests__/parity/fixtures/address/chain-dsl.d.ts.map +0 -1
- package/dist/__tests__/parity/fixtures/address/expected-ir.d.ts +0 -9
- package/dist/__tests__/parity/fixtures/address/expected-ir.d.ts.map +0 -1
- package/dist/__tests__/parity/fixtures/address/tsdoc.d.ts +0 -19
- package/dist/__tests__/parity/fixtures/address/tsdoc.d.ts.map +0 -1
- package/dist/__tests__/parity/fixtures/plan-status/chain-dsl.d.ts +0 -19
- package/dist/__tests__/parity/fixtures/plan-status/chain-dsl.d.ts.map +0 -1
- package/dist/__tests__/parity/fixtures/plan-status/expected-ir.d.ts +0 -6
- package/dist/__tests__/parity/fixtures/plan-status/expected-ir.d.ts.map +0 -1
- package/dist/__tests__/parity/fixtures/plan-status/tsdoc.d.ts +0 -17
- package/dist/__tests__/parity/fixtures/plan-status/tsdoc.d.ts.map +0 -1
- package/dist/__tests__/parity/fixtures/product-config/chain-dsl.d.ts +0 -13
- package/dist/__tests__/parity/fixtures/product-config/chain-dsl.d.ts.map +0 -1
- package/dist/__tests__/parity/fixtures/product-config/expected-ir.d.ts +0 -9
- package/dist/__tests__/parity/fixtures/product-config/expected-ir.d.ts.map +0 -1
- package/dist/__tests__/parity/fixtures/product-config/tsdoc.d.ts +0 -28
- package/dist/__tests__/parity/fixtures/product-config/tsdoc.d.ts.map +0 -1
- package/dist/__tests__/parity/fixtures/usd-cents/chain-dsl.d.ts +0 -9
- package/dist/__tests__/parity/fixtures/usd-cents/chain-dsl.d.ts.map +0 -1
- package/dist/__tests__/parity/fixtures/usd-cents/expected-ir.d.ts +0 -6
- package/dist/__tests__/parity/fixtures/usd-cents/expected-ir.d.ts.map +0 -1
- package/dist/__tests__/parity/fixtures/usd-cents/tsdoc.d.ts +0 -19
- package/dist/__tests__/parity/fixtures/usd-cents/tsdoc.d.ts.map +0 -1
- package/dist/__tests__/parity/fixtures/user-registration/chain-dsl.d.ts +0 -12
- package/dist/__tests__/parity/fixtures/user-registration/chain-dsl.d.ts.map +0 -1
- package/dist/__tests__/parity/fixtures/user-registration/expected-ir.d.ts +0 -9
- package/dist/__tests__/parity/fixtures/user-registration/expected-ir.d.ts.map +0 -1
- package/dist/__tests__/parity/fixtures/user-registration/tsdoc.d.ts +0 -19
- package/dist/__tests__/parity/fixtures/user-registration/tsdoc.d.ts.map +0 -1
- package/dist/__tests__/parity/parity.test.d.ts +0 -18
- package/dist/__tests__/parity/parity.test.d.ts.map +0 -1
- package/dist/__tests__/parity/utils.d.ts +0 -152
- package/dist/__tests__/parity/utils.d.ts.map +0 -1
- package/dist/__tests__/path-target-parser.test.d.ts +0 -9
- package/dist/__tests__/path-target-parser.test.d.ts.map +0 -1
- package/dist/__tests__/write-schemas.test.d.ts +0 -2
- package/dist/__tests__/write-schemas.test.d.ts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"edge-cases.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/edge-cases.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extension-api.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/extension-api.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extension-runtime.integration.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/extension-runtime.integration.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/** @multipleOf 1 */
|
|
2
|
-
type Integer = number;
|
|
3
|
-
/** @minimum 0 @maximum 100 */
|
|
4
|
-
type Percentage = Integer;
|
|
5
|
-
export declare class TwoLevelChain {
|
|
6
|
-
/** @minimum 10 */
|
|
7
|
-
cpuUsage: Percentage;
|
|
8
|
-
memoryUsage: Percentage;
|
|
9
|
-
}
|
|
10
|
-
/** @minimum 0 */
|
|
11
|
-
type Base = number;
|
|
12
|
-
/** @maximum 1000 */
|
|
13
|
-
type Mid = Base;
|
|
14
|
-
/** @multipleOf 5 */
|
|
15
|
-
type Leaf = Mid;
|
|
16
|
-
export declare class ThreeLevelChain {
|
|
17
|
-
value: Leaf;
|
|
18
|
-
}
|
|
19
|
-
export declare class NoAlias {
|
|
20
|
-
/** @minimum 0 */
|
|
21
|
-
count: number;
|
|
22
|
-
}
|
|
23
|
-
type D0 = number;
|
|
24
|
-
type D1 = D0;
|
|
25
|
-
type D2 = D1;
|
|
26
|
-
type D3 = D2;
|
|
27
|
-
type D4 = D3;
|
|
28
|
-
type D5 = D4;
|
|
29
|
-
type D6 = D5;
|
|
30
|
-
type D7 = D6;
|
|
31
|
-
type D8 = D7;
|
|
32
|
-
type D9 = D8;
|
|
33
|
-
export declare class ExceedsMaxDepth {
|
|
34
|
-
value: D9;
|
|
35
|
-
}
|
|
36
|
-
export {};
|
|
37
|
-
//# sourceMappingURL=alias-chains.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alias-chains.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/alias-chains.ts"],"names":[],"mappings":"AAIA,oBAAoB;AACpB,KAAK,OAAO,GAAG,MAAM,CAAC;AAEtB,8BAA8B;AAC9B,KAAK,UAAU,GAAG,OAAO,CAAC;AAE1B,qBAAa,aAAa;IACxB,kBAAkB;IAClB,QAAQ,EAAG,UAAU,CAAC;IACtB,WAAW,EAAG,UAAU,CAAC;CAC1B;AAID,iBAAiB;AACjB,KAAK,IAAI,GAAG,MAAM,CAAC;AAEnB,oBAAoB;AACpB,KAAK,GAAG,GAAG,IAAI,CAAC;AAEhB,oBAAoB;AACpB,KAAK,IAAI,GAAG,GAAG,CAAC;AAEhB,qBAAa,eAAe;IAC1B,KAAK,EAAG,IAAI,CAAC;CACd;AAID,qBAAa,OAAO;IAClB,iBAAiB;IACjB,KAAK,EAAG,MAAM,CAAC;CAChB;AAOD,KAAK,EAAE,GAAG,MAAM,CAAC;AACjB,KAAK,EAAE,GAAG,EAAE,CAAC;AACb,KAAK,EAAE,GAAG,EAAE,CAAC;AACb,KAAK,EAAE,GAAG,EAAE,CAAC;AACb,KAAK,EAAE,GAAG,EAAE,CAAC;AACb,KAAK,EAAE,GAAG,EAAE,CAAC;AACb,KAAK,EAAE,GAAG,EAAE,CAAC;AACb,KAAK,EAAE,GAAG,EAAE,CAAC;AACb,KAAK,EAAE,GAAG,EAAE,CAAC;AACb,KAAK,EAAE,GAAG,EAAE,CAAC;AAEb,qBAAa,eAAe;IAC1B,KAAK,EAAG,EAAE,CAAC;CACZ"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
export declare class NotificationPreferences {
|
|
2
|
-
/** @defaultValue "email" */
|
|
3
|
-
channel?: string;
|
|
4
|
-
/** @defaultValue 3 */
|
|
5
|
-
retryCount?: number;
|
|
6
|
-
/** @defaultValue true */
|
|
7
|
-
enabled?: boolean;
|
|
8
|
-
/** @defaultValue null */
|
|
9
|
-
nickname?: string | null;
|
|
10
|
-
}
|
|
11
|
-
export declare class ContactForm {
|
|
12
|
-
/** @format email */
|
|
13
|
-
emailAddress: string;
|
|
14
|
-
/** @format date */
|
|
15
|
-
birthDate: string;
|
|
16
|
-
/** @format uri */
|
|
17
|
-
website: string;
|
|
18
|
-
}
|
|
19
|
-
export declare class SearchForm {
|
|
20
|
-
/** @placeholder Search by keyword... */
|
|
21
|
-
query: string;
|
|
22
|
-
}
|
|
23
|
-
export declare class SettingsForm {
|
|
24
|
-
/** @deprecated Use displayName instead */
|
|
25
|
-
legacyName: string;
|
|
26
|
-
/** @displayName Display Name */
|
|
27
|
-
displayName: string;
|
|
28
|
-
}
|
|
29
|
-
export declare class TagManager {
|
|
30
|
-
/** @minItems 1 @maxItems 10 @uniqueItems */
|
|
31
|
-
tags: string[];
|
|
32
|
-
}
|
|
33
|
-
export declare class SurveyForm {
|
|
34
|
-
/** @maxLength 280 */
|
|
35
|
-
responses: string[];
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Summary text becomes the root schema description when no explicit tag is present.
|
|
39
|
-
*/
|
|
40
|
-
export declare class DescriptionPrecedenceForm {
|
|
41
|
-
/** Summary text becomes the description. */
|
|
42
|
-
summary: string;
|
|
43
|
-
/**
|
|
44
|
-
* Summary populates description; remarks go to x-formspec-remarks.
|
|
45
|
-
* @remarks Additional context for tooling.
|
|
46
|
-
*/
|
|
47
|
-
summaryAndRemarks: string;
|
|
48
|
-
/** @remarks Remarks go to x-formspec-remarks, not description. */
|
|
49
|
-
remarksOnly: string;
|
|
50
|
-
}
|
|
51
|
-
export declare class PriceRange {
|
|
52
|
-
/** @minimum 100 @maximum 50 */
|
|
53
|
-
price: number;
|
|
54
|
-
}
|
|
55
|
-
export declare class MismatchedForm {
|
|
56
|
-
/** @minimum 0 */
|
|
57
|
-
label: string;
|
|
58
|
-
}
|
|
59
|
-
interface Address {
|
|
60
|
-
street: string;
|
|
61
|
-
city: string;
|
|
62
|
-
}
|
|
63
|
-
export declare class LocationForm {
|
|
64
|
-
/** @minLength :zipCode 5 */
|
|
65
|
-
address: Address;
|
|
66
|
-
}
|
|
67
|
-
interface Dimensions {
|
|
68
|
-
name: string;
|
|
69
|
-
width: number;
|
|
70
|
-
}
|
|
71
|
-
export declare class BoxForm {
|
|
72
|
-
/** @minimum :name 0 */
|
|
73
|
-
size: Dimensions;
|
|
74
|
-
}
|
|
75
|
-
/** @minimum 0 */
|
|
76
|
-
type SafeTemperature = number;
|
|
77
|
-
export declare class ThermostatForm {
|
|
78
|
-
/** @minimum -10 */
|
|
79
|
-
target: SafeTemperature;
|
|
80
|
-
}
|
|
81
|
-
/** @minimum 0 */
|
|
82
|
-
export declare class InvalidPlacementForm {
|
|
83
|
-
value: number;
|
|
84
|
-
}
|
|
85
|
-
export {};
|
|
86
|
-
//# sourceMappingURL=class-schema-regressions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"class-schema-regressions.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/class-schema-regressions.ts"],"names":[],"mappings":"AAAA,qBAAa,uBAAuB;IAClC,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,sBAAsB;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,yBAAyB;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,qBAAa,WAAW;IACtB,oBAAoB;IACpB,YAAY,EAAG,MAAM,CAAC;IAEtB,mBAAmB;IACnB,SAAS,EAAG,MAAM,CAAC;IAEnB,kBAAkB;IAClB,OAAO,EAAG,MAAM,CAAC;CAClB;AAED,qBAAa,UAAU;IACrB,wCAAwC;IACxC,KAAK,EAAG,MAAM,CAAC;CAChB;AAED,qBAAa,YAAY;IACvB,0CAA0C;IAC1C,UAAU,EAAG,MAAM,CAAC;IAEpB,gCAAgC;IAChC,WAAW,EAAG,MAAM,CAAC;CACtB;AAED,qBAAa,UAAU;IACrB,4CAA4C;IAC5C,IAAI,EAAG,MAAM,EAAE,CAAC;CACjB;AAED,qBAAa,UAAU;IACrB,qBAAqB;IACrB,SAAS,EAAG,MAAM,EAAE,CAAC;CACtB;AAED;;GAEG;AACH,qBAAa,yBAAyB;IACpC,4CAA4C;IAC5C,OAAO,EAAG,MAAM,CAAC;IAEjB;;;OAGG;IACH,iBAAiB,EAAG,MAAM,CAAC;IAE3B,kEAAkE;IAClE,WAAW,EAAG,MAAM,CAAC;CACtB;AAED,qBAAa,UAAU;IACrB,+BAA+B;IAC/B,KAAK,EAAG,MAAM,CAAC;CAChB;AAED,qBAAa,cAAc;IACzB,iBAAiB;IACjB,KAAK,EAAG,MAAM,CAAC;CAChB;AAED,UAAU,OAAO;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,qBAAa,YAAY;IACvB,4BAA4B;IAC5B,OAAO,EAAG,OAAO,CAAC;CACnB;AAED,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,qBAAa,OAAO;IAClB,uBAAuB;IACvB,IAAI,EAAG,UAAU,CAAC;CACnB;AAED,iBAAiB;AACjB,KAAK,eAAe,GAAG,MAAM,CAAC;AAE9B,qBAAa,cAAc;IACzB,mBAAmB;IACnB,MAAM,EAAG,eAAe,CAAC;CAC1B;AAED,iBAAiB;AACjB,qBAAa,oBAAoB;IAC/B,KAAK,EAAG,MAAM,CAAC;CAChB"}
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Edge case fixtures for testing type converter and analyzer.
|
|
3
|
-
*
|
|
4
|
-
* These test various TypeScript type patterns that might cause issues.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Mixed type union (not just literals) - should produce oneOf.
|
|
8
|
-
*/
|
|
9
|
-
export declare class MixedUnionTypes {
|
|
10
|
-
mixedPrimitive: string | number;
|
|
11
|
-
complexUnion: string | {
|
|
12
|
-
nested: boolean;
|
|
13
|
-
};
|
|
14
|
-
objectUnion: {
|
|
15
|
-
type: "a";
|
|
16
|
-
valueA: string;
|
|
17
|
-
} | {
|
|
18
|
-
type: "b";
|
|
19
|
-
valueB: number;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Various nullable patterns.
|
|
24
|
-
*/
|
|
25
|
-
export declare class NullablePatterns {
|
|
26
|
-
nullableString: string | null;
|
|
27
|
-
undefinedString: string | undefined;
|
|
28
|
-
optionalNullable?: string | null;
|
|
29
|
-
tripleUnion: string | null | undefined;
|
|
30
|
-
nullableStatus: "active" | "inactive" | null;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Various array patterns.
|
|
34
|
-
*/
|
|
35
|
-
export declare class ArrayEdgeCases {
|
|
36
|
-
strings: string[];
|
|
37
|
-
mixedArray: (string | number)[];
|
|
38
|
-
nullableArray: string[] | null;
|
|
39
|
-
objectArray: {
|
|
40
|
-
id: number;
|
|
41
|
-
name: string;
|
|
42
|
-
}[];
|
|
43
|
-
anyArray: unknown[];
|
|
44
|
-
nestedArray: string[][];
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Self-referential dictionary type — used to verify the circular-reference
|
|
48
|
-
* guard in `tryResolveRecordType`. An index signature that references its
|
|
49
|
-
* own interface is the TS-valid equivalent of `Record<string, X>` where X
|
|
50
|
-
* is self-referential; without the guard, resolving the value type would
|
|
51
|
-
* recurse infinitely.
|
|
52
|
-
*/
|
|
53
|
-
export interface SelfRefRecord {
|
|
54
|
-
[key: string]: SelfRefRecord;
|
|
55
|
-
}
|
|
56
|
-
export interface StringMap {
|
|
57
|
-
[key: string]: string;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Various object type patterns.
|
|
61
|
-
*/
|
|
62
|
-
export declare class CircularNode {
|
|
63
|
-
id: string;
|
|
64
|
-
next?: CircularNode;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Various object type patterns.
|
|
68
|
-
*/
|
|
69
|
-
export declare class ObjectEdgeCases {
|
|
70
|
-
emptyObject: {};
|
|
71
|
-
stringRecord: Record<string, string>;
|
|
72
|
-
namedStringMap: StringMap;
|
|
73
|
-
selfRefRecord: SelfRefRecord;
|
|
74
|
-
deepNested: {
|
|
75
|
-
level1: {
|
|
76
|
-
level2: {
|
|
77
|
-
level3: {
|
|
78
|
-
value: string;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
optionalProps: {
|
|
84
|
-
required: string;
|
|
85
|
-
optional?: number;
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Special TypeScript types.
|
|
90
|
-
*/
|
|
91
|
-
export declare class SpecialTypes {
|
|
92
|
-
anyField: any;
|
|
93
|
-
unknownField: unknown;
|
|
94
|
-
voidField: void;
|
|
95
|
-
dateField: Date;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Various enum patterns.
|
|
99
|
-
*/
|
|
100
|
-
export declare class EnumVariations {
|
|
101
|
-
singleLiteral: "only";
|
|
102
|
-
numberEnum: 1 | 2 | 3;
|
|
103
|
-
mixedLiterals: "string" | 42;
|
|
104
|
-
largeEnum: "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j";
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Simple class with no decorators for testing analyzer edge cases.
|
|
108
|
-
*/
|
|
109
|
-
export declare class NoDecoratorsClass {
|
|
110
|
-
name: string;
|
|
111
|
-
count?: number;
|
|
112
|
-
active: boolean;
|
|
113
|
-
}
|
|
114
|
-
export declare const notFormSpec1: null;
|
|
115
|
-
export declare const notFormSpec2: undefined;
|
|
116
|
-
export declare const notFormSpec3 = "string";
|
|
117
|
-
export declare const notFormSpec4 = 123;
|
|
118
|
-
export declare const notFormSpec5: {
|
|
119
|
-
notElements: never[];
|
|
120
|
-
};
|
|
121
|
-
export declare const notFormSpec6: {
|
|
122
|
-
elements: string;
|
|
123
|
-
};
|
|
124
|
-
export declare const notFormSpec7: {
|
|
125
|
-
elements: {
|
|
126
|
-
missingType: boolean;
|
|
127
|
-
}[];
|
|
128
|
-
};
|
|
129
|
-
export declare const notFormSpec8: {
|
|
130
|
-
elements: null[];
|
|
131
|
-
};
|
|
132
|
-
//# sourceMappingURL=edge-cases.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"edge-cases.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/edge-cases.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export declare class ExampleAForm {
|
|
2
|
-
/**
|
|
3
|
-
* Your legal name
|
|
4
|
-
* @displayName Full Name
|
|
5
|
-
* @minLength 2
|
|
6
|
-
* @maxLength 100
|
|
7
|
-
*/
|
|
8
|
-
name: string;
|
|
9
|
-
/** @displayName Age
|
|
10
|
-
* @minimum 0
|
|
11
|
-
* @maximum 150
|
|
12
|
-
*/
|
|
13
|
-
age: number;
|
|
14
|
-
/** @displayName Score
|
|
15
|
-
* @exclusiveMinimum 0
|
|
16
|
-
*/
|
|
17
|
-
score: number;
|
|
18
|
-
/** @displayName Email
|
|
19
|
-
* @pattern ^[^@]+@[^@]+$
|
|
20
|
-
*/
|
|
21
|
-
email?: string;
|
|
22
|
-
/** @displayName Country
|
|
23
|
-
* @enumOptions [{"id":"us","label":"United States"},{"id":"ca","label":"Canada"}]
|
|
24
|
-
*/
|
|
25
|
-
country: "us" | "ca";
|
|
26
|
-
state?: string;
|
|
27
|
-
/** @deprecated Use email instead */
|
|
28
|
-
fax?: string;
|
|
29
|
-
role: "admin" | "user";
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=example-a-builtins.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-a-builtins.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/example-a-builtins.ts"],"names":[],"mappings":"AAAA,qBAAa,YAAY;IACvB;;;;;OAKG;IACH,IAAI,EAAG,MAAM,CAAC;IAEd;;;OAGG;IACH,GAAG,EAAG,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAG,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,EAAG,IAAI,GAAG,IAAI,CAAC;IAEtB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,oCAAoC;IACpC,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,IAAI,EAAE,OAAO,GAAG,MAAM,CAAU;CACjC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type ConstraintTagRegistration, type CustomConstraintRegistration, type CustomTypeRegistration } from "@formspec/core";
|
|
2
|
-
export declare const DATE_EXTENSION_ID = "x-formspec/example-date";
|
|
3
|
-
export declare const DATE_TIME_TYPE_ID = "x-formspec/example-date/DateTime";
|
|
4
|
-
export declare function parseCanonicalDateTime(raw: string): string;
|
|
5
|
-
export declare const dateTimeType: CustomTypeRegistration;
|
|
6
|
-
export declare const afterConstraint: CustomConstraintRegistration;
|
|
7
|
-
export declare const beforeConstraint: CustomConstraintRegistration;
|
|
8
|
-
export declare const afterTag: ConstraintTagRegistration;
|
|
9
|
-
export declare const beforeTag: ConstraintTagRegistration;
|
|
10
|
-
export declare const dateExtension: import("@formspec/core").ExtensionDefinition;
|
|
11
|
-
export declare function createDateExtensionRegistry(): import("../../extensions/registry.js").ExtensionRegistry;
|
|
12
|
-
//# sourceMappingURL=example-date-extension.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-date-extension.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/example-date-extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,sBAAsB,EAG5B,MAAM,gBAAgB,CAAC;AAGxB,eAAO,MAAM,iBAAiB,4BAA4B,CAAC;AAC3D,eAAO,MAAM,iBAAiB,qCAAkC,CAAC;AAKjE,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAc1D;AAoBD,eAAO,MAAM,YAAY,EAAE,sBASzB,CAAC;AAwBH,eAAO,MAAM,eAAe,8BAAiD,CAAC;AAC9E,eAAO,MAAM,gBAAgB,8BAAmD,CAAC;AAEjF,eAAO,MAAM,QAAQ,EAAE,yBAKrB,CAAC;AAEH,eAAO,MAAM,SAAS,EAAE,yBAKtB,CAAC;AAEH,eAAO,MAAM,aAAa,8CAKxB,CAAC;AAEH,wBAAgB,2BAA2B,6DAE1C"}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Test fixtures for interface and type alias analysis.
|
|
3
|
-
*
|
|
4
|
-
* Tests the TSDoc-based schema extraction pipeline for interfaces,
|
|
5
|
-
* type aliases, nested types, and edge cases.
|
|
6
|
-
*/
|
|
7
|
-
export interface SimpleConfig {
|
|
8
|
-
/**
|
|
9
|
-
* The user's legal name
|
|
10
|
-
* @displayName Full Name
|
|
11
|
-
* @minLength 1
|
|
12
|
-
* @maxLength 200
|
|
13
|
-
*/
|
|
14
|
-
name: string;
|
|
15
|
-
/** @displayName Age @minimum 0 @maximum 150 */
|
|
16
|
-
age: number;
|
|
17
|
-
/** @displayName Email @pattern ^[^@]+@[^@]+$ */
|
|
18
|
-
email?: string;
|
|
19
|
-
/** @displayName Active */
|
|
20
|
-
active: boolean;
|
|
21
|
-
}
|
|
22
|
-
export interface WithEnumOptions {
|
|
23
|
-
/**
|
|
24
|
-
* @displayName Status
|
|
25
|
-
* @enumOptions ["draft","active","archived"]
|
|
26
|
-
*/
|
|
27
|
-
status: "draft" | "active" | "archived";
|
|
28
|
-
/**
|
|
29
|
-
* @displayName Priority
|
|
30
|
-
* @enumOptions [{"id":"low","label":"Low Priority"},{"id":"high","label":"High Priority"}]
|
|
31
|
-
*/
|
|
32
|
-
priority: "low" | "high";
|
|
33
|
-
}
|
|
34
|
-
export interface EmptyInterface {
|
|
35
|
-
}
|
|
36
|
-
export interface OnlyOptionalFields {
|
|
37
|
-
/** @displayName Notes */
|
|
38
|
-
notes?: string;
|
|
39
|
-
/** @displayName Tags */
|
|
40
|
-
tags?: string;
|
|
41
|
-
}
|
|
42
|
-
/** @deprecated Use NewConfig instead */
|
|
43
|
-
export interface DeprecatedFieldInterface {
|
|
44
|
-
/** @deprecated Use fullName instead */
|
|
45
|
-
name?: string;
|
|
46
|
-
/** @displayName Full Name */
|
|
47
|
-
fullName: string;
|
|
48
|
-
}
|
|
49
|
-
export type SimpleTypeAlias = {
|
|
50
|
-
/** @displayName Label @minLength 1 */
|
|
51
|
-
label: string;
|
|
52
|
-
/** @displayName Count @minimum 0 */
|
|
53
|
-
count: number;
|
|
54
|
-
/** @displayName Description */
|
|
55
|
-
description?: string;
|
|
56
|
-
};
|
|
57
|
-
export type TypeAliasWithEnumOptions = {
|
|
58
|
-
/**
|
|
59
|
-
* @displayName Color
|
|
60
|
-
* @enumOptions ["red","green","blue"]
|
|
61
|
-
*/
|
|
62
|
-
color: "red" | "green" | "blue";
|
|
63
|
-
};
|
|
64
|
-
export type StringAlias = string;
|
|
65
|
-
export type UnionAlias = "a" | "b" | "c";
|
|
66
|
-
/** @minimum 0 @maximum 100 */
|
|
67
|
-
export type Percent = number;
|
|
68
|
-
/** @minLength 1 @maxLength 255 @pattern ^[^@]+@[^@]+$ */
|
|
69
|
-
export type Email = string;
|
|
70
|
-
/**
|
|
71
|
-
* Percentage discount applied
|
|
72
|
-
* @displayName Discount Rate
|
|
73
|
-
* @minimum 0
|
|
74
|
-
* @maximum 100
|
|
75
|
-
*/
|
|
76
|
-
export type AnnotatedPercent = number;
|
|
77
|
-
export interface ConfigWithAliasedTypes {
|
|
78
|
-
/** @displayName Discount */
|
|
79
|
-
discount: Percent;
|
|
80
|
-
/** @displayName Contact Email */
|
|
81
|
-
contactEmail: Email;
|
|
82
|
-
/** @displayName Tax Rate */
|
|
83
|
-
taxRate: AnnotatedPercent;
|
|
84
|
-
}
|
|
85
|
-
export interface Address {
|
|
86
|
-
/** @displayName Street @minLength 1 @maxLength 200 */
|
|
87
|
-
street: string;
|
|
88
|
-
/** @displayName City @minLength 1 */
|
|
89
|
-
city: string;
|
|
90
|
-
/** @displayName Zip @pattern ^[0-9]{5}$ */
|
|
91
|
-
zip?: string;
|
|
92
|
-
}
|
|
93
|
-
export type ContactInfo = {
|
|
94
|
-
/** @displayName Email @pattern ^[^@]+@[^@]+$ */
|
|
95
|
-
email: string;
|
|
96
|
-
/** @displayName Phone @maxLength 20 */
|
|
97
|
-
phone?: string;
|
|
98
|
-
};
|
|
99
|
-
export interface NestedConfig {
|
|
100
|
-
/** @displayName Name */
|
|
101
|
-
name: string;
|
|
102
|
-
/** @displayName Address */
|
|
103
|
-
address: Address;
|
|
104
|
-
/** @displayName Contact */
|
|
105
|
-
contact: ContactInfo;
|
|
106
|
-
}
|
|
107
|
-
//# sourceMappingURL=example-interface-types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-interface-types.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/example-interface-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,YAAY;IAC3B;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb,+CAA+C;IAC/C,GAAG,EAAE,MAAM,CAAC;IAEZ,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,0BAA0B;IAC1B,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,MAAM,EAAE,OAAO,GAAG,QAAQ,GAAG,UAAU,CAAC;IAExC;;;OAGG;IACH,QAAQ,EAAE,KAAK,GAAG,MAAM,CAAC;CAC1B;AAGD,MAAM,WAAW,cAAc;CAAG;AAElC,MAAM,WAAW,kBAAkB;IACjC,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wBAAwB;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wCAAwC;AACxC,MAAM,WAAW,wBAAwB;IACvC,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAKD,MAAM,MAAM,eAAe,GAAG;IAC5B,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IAEd,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IAEd,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAGF,MAAM,MAAM,wBAAwB,GAAG;IACrC;;;OAGG;IACH,KAAK,EAAE,KAAK,GAAG,OAAO,GAAG,MAAM,CAAC;CACjC,CAAC;AAGF,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AACjC,MAAM,MAAM,UAAU,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAIzC,8BAA8B;AAC9B,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAE7B,yDAAyD;AACzD,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC;AAE3B;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEtC,MAAM,WAAW,sBAAsB;IACrC,4BAA4B;IAC5B,QAAQ,EAAE,OAAO,CAAC;IAElB,iCAAiC;IACjC,YAAY,EAAE,KAAK,CAAC;IAEpB,4BAA4B;IAC5B,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAID,MAAM,WAAW,OAAO;IACtB,sDAAsD;IACtD,MAAM,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAGD,MAAM,MAAM,WAAW,GAAG;IACxB,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,2BAA2B;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,2BAA2B;IAC3B,OAAO,EAAE,WAAW,CAAC;CACtB"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type ConstraintTagRegistration, type CustomTypeRegistration } from "@formspec/core";
|
|
2
|
-
export declare const NUMERIC_EXTENSION_ID = "x-formspec/example-numeric";
|
|
3
|
-
export declare const DECIMAL_TYPE_ID = "x-formspec/example-numeric/Decimal";
|
|
4
|
-
export declare const BIGINT_TYPE_ID = "x-formspec/example-numeric/BigInt";
|
|
5
|
-
export interface DecimalValue {
|
|
6
|
-
readonly coefficient: bigint;
|
|
7
|
-
readonly scale: number;
|
|
8
|
-
}
|
|
9
|
-
export declare function parseDecimal(raw: string): DecimalValue;
|
|
10
|
-
export declare function formatDecimal(value: DecimalValue): string;
|
|
11
|
-
export declare function compareDecimal(left: DecimalValue, right: DecimalValue): -1 | 0 | 1;
|
|
12
|
-
export declare function addDecimal(left: DecimalValue, right: DecimalValue): DecimalValue;
|
|
13
|
-
export declare function subtractDecimal(left: DecimalValue, right: DecimalValue): DecimalValue;
|
|
14
|
-
export declare const decimalType: CustomTypeRegistration;
|
|
15
|
-
export declare const bigIntType: CustomTypeRegistration;
|
|
16
|
-
export declare const maxSigFigTag: ConstraintTagRegistration;
|
|
17
|
-
export declare const maxDecimalPlacesTag: ConstraintTagRegistration;
|
|
18
|
-
export declare const numericExtension: import("@formspec/core").ExtensionDefinition;
|
|
19
|
-
export declare function createNumericExtensionRegistry(): import("../../extensions/registry.js").ExtensionRegistry;
|
|
20
|
-
//# sourceMappingURL=example-numeric-extension.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-numeric-extension.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/example-numeric-extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,yBAAyB,EAE9B,KAAK,sBAAsB,EAG5B,MAAM,gBAAgB,CAAC;AAGxB,eAAO,MAAM,oBAAoB,+BAA+B,CAAC;AACjE,eAAO,MAAM,eAAe,uCAAoC,CAAC;AACjE,eAAO,MAAM,cAAc,sCAAmC,CAAC;AAE/D,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAMD,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAetD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAazD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CASlF;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,GAAG,YAAY,CAQhF;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,GAAG,YAAY,CAQrF;AAgDD,eAAO,MAAM,WAAW,EAAE,sBAkCxB,CAAC;AAEH,eAAO,MAAM,UAAU,EAAE,sBAOvB,CAAC;AA6FH,eAAO,MAAM,YAAY,EAAE,yBAKzB,CAAC;AAEH,eAAO,MAAM,mBAAmB,EAAE,yBAKhC,CAAC;AAEH,eAAO,MAAM,gBAAgB,8CAa3B,CAAC;AAEH,wBAAgB,8BAA8B,6DAE7C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extension-forms.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/extension-forms.ts"],"names":[],"mappings":"AAAA,KAAK,YAAY,GAAG,MAAM,CAAC;AAE3B,MAAM,WAAW,WAAW;IAC1B,mBAAmB;IACnB,MAAM,EAAE,YAAY,CAAC;CACtB"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Static shipping-address model for mixed-authoring composition tests.
|
|
3
|
-
*/
|
|
4
|
-
export declare class ShippingAddressModel {
|
|
5
|
-
/** @displayName Country */
|
|
6
|
-
country: string;
|
|
7
|
-
/** @displayName City */
|
|
8
|
-
city: string;
|
|
9
|
-
/** @displayName Postal Code */
|
|
10
|
-
postalCode?: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* ChainDSL overlay for the runtime-backed city field.
|
|
14
|
-
*/
|
|
15
|
-
export declare const shippingAddressOverlays: import("@formspec/core").FormSpec<readonly [import("@formspec/core").DynamicEnumField<"city", "cities">]>;
|
|
16
|
-
export declare class NumericShippingAddressModel {
|
|
17
|
-
cityCode: number;
|
|
18
|
-
}
|
|
19
|
-
export declare const incompatibleShippingAddressOverlays: import("@formspec/core").FormSpec<readonly [import("@formspec/core").DynamicEnumField<"cityCode", "cities">]>;
|
|
20
|
-
export declare class NestedShippingAddressModel {
|
|
21
|
-
address: {
|
|
22
|
-
city: string;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
export declare const nestedShippingAddressOverlays: import("@formspec/core").FormSpec<readonly [import("@formspec/core").ObjectField<"address", readonly [import("@formspec/core").DynamicEnumField<"city", "cities">]>]>;
|
|
26
|
-
export declare const duplicateShippingAddressOverlays: import("@formspec/core").FormSpec<readonly [import("@formspec/core").DynamicEnumField<"city", "cities">, import("@formspec/core").DynamicEnumField<"city", "backup-cities">]>;
|
|
27
|
-
export declare const unknownShippingAddressOverlays: import("@formspec/core").FormSpec<readonly [import("@formspec/core").DynamicEnumField<"region", "regions">]>;
|
|
28
|
-
export declare const constrainedShippingAddressOverlays: import("@formspec/core").FormSpec<readonly [import("@formspec/core").TextField<"city">]>;
|
|
29
|
-
export declare const requiredShippingAddressOverlays: import("@formspec/core").FormSpec<readonly [import("@formspec/core").TextField<"postalCode">]>;
|
|
30
|
-
export declare const requiredCountryShippingAddressOverlays: import("@formspec/core").FormSpec<readonly [import("@formspec/core").TextField<"country">]>;
|
|
31
|
-
//# sourceMappingURL=mixed-authoring-shipping-address.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mixed-authoring-shipping-address.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/mixed-authoring-shipping-address.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,qBAAa,oBAAoB;IAC/B,2BAA2B;IAC3B,OAAO,EAAG,MAAM,CAAC;IAEjB,wBAAwB;IACxB,IAAI,EAAG,MAAM,CAAC;IAEd,+BAA+B;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,2GAInC,CAAC;AAEF,qBAAa,2BAA2B;IACtC,QAAQ,EAAG,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,mCAAmC,+GAE/C,CAAC;AAEF,qBAAa,0BAA0B;IACrC,OAAO,EAAG;QACR,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED,eAAO,MAAM,6BAA6B,uKAEzC,CAAC;AAEF,eAAO,MAAM,gCAAgC,+KAG5C,CAAC;AAEF,eAAO,MAAM,8BAA8B,8GAAmD,CAAC;AAE/F,eAAO,MAAM,kCAAkC,0FAAiD,CAAC;AAEjG,eAAO,MAAM,+BAA+B,gGAE3C,CAAC;AAEF,eAAO,MAAM,sCAAsC,6FAElD,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/** @multipleOf 1 */
|
|
2
|
-
export type Integer = number;
|
|
3
|
-
/** @minimum 0 @maximum 65535 */
|
|
4
|
-
export type PortNumber = Integer;
|
|
5
|
-
/** @minimum 0 @maximum 100 */
|
|
6
|
-
export type Percentage = number;
|
|
7
|
-
/** @minimum 0 @maximum 9007199254740991 */
|
|
8
|
-
export type BigCounter = bigint;
|
|
9
|
-
export declare class ServerConfig {
|
|
10
|
-
httpPort: PortNumber;
|
|
11
|
-
httpsPort: PortNumber;
|
|
12
|
-
cpuThreshold: Percentage;
|
|
13
|
-
requestCount: BigCounter;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=named-primitive-aliases.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"named-primitive-aliases.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/named-primitive-aliases.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAE7B,gCAAgC;AAChC,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC;AAEjC,8BAA8B;AAC9B,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC,2CAA2C;AAC3C,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC,qBAAa,YAAY;IACvB,QAAQ,EAAG,UAAU,CAAC;IACtB,SAAS,EAAG,UAAU,CAAC;IACvB,YAAY,EAAG,UAAU,CAAC;IAC1B,YAAY,EAAG,UAAU,CAAC;CAC3B"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface Article {
|
|
2
|
-
tags: string[];
|
|
3
|
-
}
|
|
4
|
-
export declare class BlogConfig {
|
|
5
|
-
/**
|
|
6
|
-
* @minItems 1
|
|
7
|
-
* @maxItems 50
|
|
8
|
-
* @minItems :tags 1
|
|
9
|
-
* @maxItems :tags 20
|
|
10
|
-
* @uniqueItems :tags
|
|
11
|
-
*/
|
|
12
|
-
articles: Article[];
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=nested-array-path-constraints.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nested-array-path-constraints.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/nested-array-path-constraints.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,qBAAa,UAAU;IACrB;;;;;;OAMG;IACH,QAAQ,EAAG,OAAO,EAAE,CAAC;CACtB"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Test fixture for CLI analyzer.
|
|
3
|
-
*
|
|
4
|
-
* Contains both:
|
|
5
|
-
* - Decorated classes (class + decorator DSL)
|
|
6
|
-
* - FormSpec exports (chain DSL)
|
|
7
|
-
*/
|
|
8
|
-
import type { InferFormSchema } from "@formspec/dsl";
|
|
9
|
-
/**
|
|
10
|
-
* FormSpec for user registration.
|
|
11
|
-
*/
|
|
12
|
-
export declare const UserRegistrationForm: import("@formspec/core").FormSpec<readonly [import("@formspec/core").TextField<"username">, import("@formspec/core").TextField<"email">, import("@formspec/core").TextField<"password">, import("@formspec/core").BooleanField<"acceptTerms">]>;
|
|
13
|
-
/**
|
|
14
|
-
* FormSpec for product configuration.
|
|
15
|
-
*/
|
|
16
|
-
export declare const ProductConfigForm: import("@formspec/core").FormSpec<readonly [import("@formspec/core").TextField<"name">, import("@formspec/core").NumberField<"price">, import("@formspec/core").StaticEnumField<"status", readonly ["draft", "active", "archived"]>]>;
|
|
17
|
-
/**
|
|
18
|
-
* FormSpec for method parameters.
|
|
19
|
-
*/
|
|
20
|
-
export declare const ActivateParams: import("@formspec/core").FormSpec<readonly [import("@formspec/core").NumberField<"amount">, import("@formspec/core").NumberField<"installments">]>;
|
|
21
|
-
export declare const CancelParams: import("@formspec/core").FormSpec<readonly [import("@formspec/core").StaticEnumField<"reason", readonly ["user_request", "fraud", "other"]>, import("@formspec/core").TextField<"notes">]>;
|
|
22
|
-
/**
|
|
23
|
-
* Sample class with decorated fields and methods.
|
|
24
|
-
*/
|
|
25
|
-
export declare class InstallmentPlan {
|
|
26
|
-
status: "active" | "paused" | "canceled";
|
|
27
|
-
amount: number;
|
|
28
|
-
customerEmail?: string;
|
|
29
|
-
installments: number;
|
|
30
|
-
/**
|
|
31
|
-
* Activates the plan with the given parameters.
|
|
32
|
-
*/
|
|
33
|
-
activate(params: InferFormSchema<typeof ActivateParams>): {
|
|
34
|
-
success: boolean;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Cancels the plan.
|
|
38
|
-
*/
|
|
39
|
-
cancelPlan(params: InferFormSchema<typeof CancelParams>): void;
|
|
40
|
-
/**
|
|
41
|
-
* Static factory method.
|
|
42
|
-
*/
|
|
43
|
-
static createStandard(name: string, amount: number): InstallmentPlan;
|
|
44
|
-
}
|
|
45
|
-
export declare class SimpleProduct {
|
|
46
|
-
name: string;
|
|
47
|
-
price?: number;
|
|
48
|
-
active: boolean;
|
|
49
|
-
tags?: string[];
|
|
50
|
-
update(data: {
|
|
51
|
-
name?: string;
|
|
52
|
-
price?: number;
|
|
53
|
-
}): boolean;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Collect vehicle details for fleet management
|
|
57
|
-
* @displayName Vehicle Registration
|
|
58
|
-
*/
|
|
59
|
-
export declare class VehicleRegistration {
|
|
60
|
-
/** @displayName Make */
|
|
61
|
-
make: string;
|
|
62
|
-
/** @displayName Model */
|
|
63
|
-
model: string;
|
|
64
|
-
}
|
|
65
|
-
//# sourceMappingURL=sample-forms.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sample-forms.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/sample-forms.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAMrD;;GAEG;AACH,eAAO,MAAM,oBAAoB,iPAKhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,uOAM7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,oJAG1B,CAAC;AAEF,eAAO,MAAM,YAAY,4LAKxB,CAAC;AAMF;;GAEG;AACH,qBAAa,eAAe;IAC1B,MAAM,EAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;IAE1C,MAAM,EAAG,MAAM,CAAC;IAEhB,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,YAAY,EAAG,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC,OAAO,cAAc,CAAC,GAAG;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE;IAK9E;;OAEG;IACH,UAAU,CAAC,MAAM,EAAE,eAAe,CAAC,OAAO,YAAY,CAAC,GAAG,IAAI;IAI9D;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,eAAe;CAKrE;AAMD,qBAAa,aAAa;IACxB,IAAI,EAAG,MAAM,CAAC;IAEd,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,MAAM,EAAG,OAAO,CAAC;IAEjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB,MAAM,CAAC,IAAI,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO;CAKzD;AAED;;;GAGG;AACH,qBAAa,mBAAmB;IAC9B,wBAAwB;IACxB,IAAI,EAAG,MAAM,CAAC;IAEd,yBAAyB;IACzB,KAAK,EAAG,MAAM,CAAC;CAChB"}
|