@formspec/build 0.1.0-alpha.1 → 0.1.0-alpha.10
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 +138 -0
- package/dist/__tests__/analyzer-edge-cases.test.d.ts +13 -0
- package/dist/__tests__/analyzer-edge-cases.test.d.ts.map +1 -0
- package/dist/__tests__/analyzer-edge-cases.test.js +376 -0
- package/dist/__tests__/analyzer-edge-cases.test.js.map +1 -0
- package/dist/__tests__/analyzer.test.d.ts +5 -0
- package/dist/__tests__/analyzer.test.d.ts.map +1 -0
- package/dist/__tests__/analyzer.test.js +190 -0
- package/dist/__tests__/analyzer.test.js.map +1 -0
- package/dist/__tests__/cli.test.js.map +1 -1
- package/dist/__tests__/codegen.test.d.ts +5 -0
- package/dist/__tests__/codegen.test.d.ts.map +1 -0
- package/dist/__tests__/codegen.test.js +506 -0
- package/dist/__tests__/codegen.test.js.map +1 -0
- package/dist/__tests__/decorator-pipeline.test.d.ts +11 -0
- package/dist/__tests__/decorator-pipeline.test.d.ts.map +1 -0
- package/dist/__tests__/decorator-pipeline.test.js +460 -0
- package/dist/__tests__/decorator-pipeline.test.js.map +1 -0
- package/dist/__tests__/edge-cases.test.js +10 -4
- package/dist/__tests__/edge-cases.test.js.map +1 -1
- package/dist/__tests__/fixtures/edge-cases.d.ts +110 -0
- package/dist/__tests__/fixtures/edge-cases.d.ts.map +1 -0
- package/dist/__tests__/fixtures/edge-cases.js +137 -0
- package/dist/__tests__/fixtures/edge-cases.js.map +1 -0
- package/dist/__tests__/fixtures/example-a-builtins.d.ts +12 -0
- package/dist/__tests__/fixtures/example-a-builtins.d.ts.map +1 -0
- package/dist/__tests__/fixtures/example-a-builtins.js +100 -0
- package/dist/__tests__/fixtures/example-a-builtins.js.map +1 -0
- package/dist/__tests__/fixtures/example-b-decorators.d.ts +5 -0
- package/dist/__tests__/fixtures/example-b-decorators.d.ts.map +1 -0
- package/dist/__tests__/fixtures/example-b-decorators.js +5 -0
- package/dist/__tests__/fixtures/example-b-decorators.js.map +1 -0
- package/dist/__tests__/fixtures/example-b-extended.d.ts +5 -0
- package/dist/__tests__/fixtures/example-b-extended.d.ts.map +1 -0
- package/dist/__tests__/fixtures/example-b-extended.js +60 -0
- package/dist/__tests__/fixtures/example-b-extended.js.map +1 -0
- package/dist/__tests__/fixtures/example-c-custom.d.ts +5 -0
- package/dist/__tests__/fixtures/example-c-custom.d.ts.map +1 -0
- package/dist/__tests__/fixtures/example-c-custom.js +61 -0
- package/dist/__tests__/fixtures/example-c-custom.js.map +1 -0
- package/dist/__tests__/fixtures/example-c-decorators.d.ts +5 -0
- package/dist/__tests__/fixtures/example-c-decorators.d.ts.map +1 -0
- package/dist/__tests__/fixtures/example-c-decorators.js +4 -0
- package/dist/__tests__/fixtures/example-c-decorators.js.map +1 -0
- package/dist/__tests__/fixtures/example-d-mixed-decorators.d.ts +6 -0
- package/dist/__tests__/fixtures/example-d-mixed-decorators.d.ts.map +1 -0
- package/dist/__tests__/fixtures/example-d-mixed-decorators.js +75 -0
- package/dist/__tests__/fixtures/example-d-mixed-decorators.js.map +1 -0
- package/dist/__tests__/fixtures/example-e-decorators.d.ts +11 -0
- package/dist/__tests__/fixtures/example-e-decorators.d.ts.map +1 -0
- package/dist/__tests__/fixtures/example-e-decorators.js +10 -0
- package/dist/__tests__/fixtures/example-e-decorators.js.map +1 -0
- package/dist/__tests__/fixtures/example-e-no-namespace.d.ts +5 -0
- package/dist/__tests__/fixtures/example-e-no-namespace.d.ts.map +1 -0
- package/dist/__tests__/fixtures/example-e-no-namespace.js +61 -0
- package/dist/__tests__/fixtures/example-e-no-namespace.js.map +1 -0
- package/dist/__tests__/fixtures/example-interface-types.d.ts +102 -0
- package/dist/__tests__/fixtures/example-interface-types.d.ts.map +1 -0
- package/dist/__tests__/fixtures/example-interface-types.js +8 -0
- package/dist/__tests__/fixtures/example-interface-types.js.map +1 -0
- package/dist/__tests__/fixtures/example-jsdoc-constraints.d.ts +16 -0
- package/dist/__tests__/fixtures/example-jsdoc-constraints.d.ts.map +1 -0
- package/dist/__tests__/fixtures/example-jsdoc-constraints.js +98 -0
- package/dist/__tests__/fixtures/example-jsdoc-constraints.js.map +1 -0
- package/dist/__tests__/fixtures/example-nested-class.d.ts +45 -0
- package/dist/__tests__/fixtures/example-nested-class.d.ts.map +1 -0
- package/dist/__tests__/fixtures/example-nested-class.js +248 -0
- package/dist/__tests__/fixtures/example-nested-class.js.map +1 -0
- package/dist/__tests__/fixtures/sample-forms.d.ts +55 -0
- package/dist/__tests__/fixtures/sample-forms.d.ts.map +1 -0
- package/dist/__tests__/fixtures/sample-forms.js +78 -0
- package/dist/__tests__/fixtures/sample-forms.js.map +1 -0
- package/dist/__tests__/generator.test.js +29 -3
- package/dist/__tests__/generator.test.js.map +1 -1
- package/dist/__tests__/integration.test.js +1 -3
- package/dist/__tests__/integration.test.js.map +1 -1
- package/dist/__tests__/interface-types.test.d.ts +11 -0
- package/dist/__tests__/interface-types.test.d.ts.map +1 -0
- package/dist/__tests__/interface-types.test.js +404 -0
- package/dist/__tests__/interface-types.test.js.map +1 -0
- package/dist/__tests__/jsdoc-constraints.test.d.ts +10 -0
- package/dist/__tests__/jsdoc-constraints.test.d.ts.map +1 -0
- package/dist/__tests__/jsdoc-constraints.test.js +465 -0
- package/dist/__tests__/jsdoc-constraints.test.js.map +1 -0
- package/dist/__tests__/write-schemas.test.js +10 -8
- package/dist/__tests__/write-schemas.test.js.map +1 -1
- package/dist/analyzer/class-analyzer.d.ts +139 -0
- package/dist/analyzer/class-analyzer.d.ts.map +1 -0
- package/dist/analyzer/class-analyzer.js +377 -0
- package/dist/analyzer/class-analyzer.js.map +1 -0
- package/dist/analyzer/decorator-extractor.d.ts +78 -0
- package/dist/analyzer/decorator-extractor.d.ts.map +1 -0
- package/dist/analyzer/decorator-extractor.js +336 -0
- package/dist/analyzer/decorator-extractor.js.map +1 -0
- package/dist/analyzer/jsdoc-constraints.d.ts +47 -0
- package/dist/analyzer/jsdoc-constraints.d.ts.map +1 -0
- package/dist/analyzer/jsdoc-constraints.js +153 -0
- package/dist/analyzer/jsdoc-constraints.js.map +1 -0
- package/dist/analyzer/program.d.ts +53 -0
- package/dist/analyzer/program.d.ts.map +1 -0
- package/dist/analyzer/program.js +114 -0
- package/dist/analyzer/program.js.map +1 -0
- package/dist/analyzer/type-converter.d.ts +75 -0
- package/dist/analyzer/type-converter.d.ts.map +1 -0
- package/dist/analyzer/type-converter.js +474 -0
- package/dist/analyzer/type-converter.js.map +1 -0
- package/dist/browser.d.ts +54 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +48 -0
- package/dist/browser.js.map +1 -0
- package/dist/build.d.ts +580 -0
- package/dist/cli.js +1 -3
- package/dist/cli.js.map +1 -1
- package/dist/codegen/index.d.ts +75 -0
- package/dist/codegen/index.d.ts.map +1 -0
- package/dist/codegen/index.js +597 -0
- package/dist/codegen/index.js.map +1 -0
- package/dist/generators/class-schema.d.ts +118 -0
- package/dist/generators/class-schema.d.ts.map +1 -0
- package/dist/generators/class-schema.js +140 -0
- package/dist/generators/class-schema.js.map +1 -0
- package/dist/generators/method-schema.d.ts +67 -0
- package/dist/generators/method-schema.d.ts.map +1 -0
- package/dist/generators/method-schema.js +108 -0
- package/dist/generators/method-schema.js.map +1 -0
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/internals.d.ts +20 -0
- package/dist/internals.d.ts.map +1 -0
- package/dist/internals.js +22 -0
- package/dist/internals.js.map +1 -0
- package/dist/json-schema/generator.d.ts.map +1 -1
- package/dist/json-schema/generator.js +26 -6
- package/dist/json-schema/generator.js.map +1 -1
- package/dist/json-schema/types.d.ts +28 -0
- package/dist/json-schema/types.d.ts.map +1 -1
- package/dist/json-schema/types.js +27 -1
- package/dist/json-schema/types.js.map +1 -1
- package/dist/ui-schema/generator.d.ts.map +1 -1
- package/dist/ui-schema/generator.js +1 -3
- package/dist/ui-schema/generator.js.map +1 -1
- package/dist/ui-schema/types.d.ts.map +1 -1
- package/package.json +18 -5
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
2
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
3
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
4
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
5
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
6
|
+
var _, done = false;
|
|
7
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
8
|
+
var context = {};
|
|
9
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
10
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
11
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
12
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
13
|
+
if (kind === "accessor") {
|
|
14
|
+
if (result === void 0) continue;
|
|
15
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
16
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
17
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
18
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
19
|
+
}
|
|
20
|
+
else if (_ = accept(result)) {
|
|
21
|
+
if (kind === "field") initializers.unshift(_);
|
|
22
|
+
else descriptor[key] = _;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
26
|
+
done = true;
|
|
27
|
+
};
|
|
28
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
29
|
+
var useValue = arguments.length > 2;
|
|
30
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
31
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
32
|
+
}
|
|
33
|
+
return useValue ? value : void 0;
|
|
34
|
+
};
|
|
35
|
+
import { Field, Minimum } from "@formspec/decorators";
|
|
36
|
+
/**
|
|
37
|
+
* Simulates a non-FormSpec decorator (e.g., from class-validator, typeorm, etc.).
|
|
38
|
+
* The pipeline should silently ignore it.
|
|
39
|
+
*/
|
|
40
|
+
function ExternalValidator(_message) {
|
|
41
|
+
return (_value, _context) => {
|
|
42
|
+
// no-op
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
let ExampleDForm = (() => {
|
|
46
|
+
let _username_decorators;
|
|
47
|
+
let _username_initializers = [];
|
|
48
|
+
let _username_extraInitializers = [];
|
|
49
|
+
let _score_decorators;
|
|
50
|
+
let _score_initializers = [];
|
|
51
|
+
let _score_extraInitializers = [];
|
|
52
|
+
let _plain_decorators;
|
|
53
|
+
let _plain_initializers = [];
|
|
54
|
+
let _plain_extraInitializers = [];
|
|
55
|
+
return class ExampleDForm {
|
|
56
|
+
static {
|
|
57
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
58
|
+
_username_decorators = [ExternalValidator("must be a valid name"), Field({ displayName: "Username" })];
|
|
59
|
+
_score_decorators = [Minimum(0), ExternalValidator("must be positive")];
|
|
60
|
+
_plain_decorators = [ExternalValidator("required field")];
|
|
61
|
+
__esDecorate(null, null, _username_decorators, { kind: "field", name: "username", static: false, private: false, access: { has: obj => "username" in obj, get: obj => obj.username, set: (obj, value) => { obj.username = value; } }, metadata: _metadata }, _username_initializers, _username_extraInitializers);
|
|
62
|
+
__esDecorate(null, null, _score_decorators, { kind: "field", name: "score", static: false, private: false, access: { has: obj => "score" in obj, get: obj => obj.score, set: (obj, value) => { obj.score = value; } }, metadata: _metadata }, _score_initializers, _score_extraInitializers);
|
|
63
|
+
__esDecorate(null, null, _plain_decorators, { kind: "field", name: "plain", static: false, private: false, access: { has: obj => "plain" in obj, get: obj => obj.plain, set: (obj, value) => { obj.plain = value; } }, metadata: _metadata }, _plain_initializers, _plain_extraInitializers);
|
|
64
|
+
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
65
|
+
}
|
|
66
|
+
username = __runInitializers(this, _username_initializers, void 0);
|
|
67
|
+
score = (__runInitializers(this, _username_extraInitializers), __runInitializers(this, _score_initializers, void 0));
|
|
68
|
+
plain = (__runInitializers(this, _score_extraInitializers), __runInitializers(this, _plain_initializers, void 0));
|
|
69
|
+
constructor() {
|
|
70
|
+
__runInitializers(this, _plain_extraInitializers);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
})();
|
|
74
|
+
export { ExampleDForm };
|
|
75
|
+
//# sourceMappingURL=example-d-mixed-decorators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"example-d-mixed-decorators.js","sourceRoot":"","sources":["../../../src/__tests__/fixtures/example-d-mixed-decorators.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;GAGG;AACH,SAAS,iBAAiB,CAAC,QAAgB;IACzC,OAAO,CAAC,MAAiB,EAAE,QAAoC,EAAQ,EAAE;QACvE,QAAQ;IACV,CAAC,CAAC;AACJ,CAAC;IAEY,YAAY;;;;;;;;;;iBAAZ,YAAY;;;oCACtB,iBAAiB,CAAC,sBAAsB,CAAC,EACzC,KAAK,CAAC,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC;iCAGlC,OAAO,CAAC,CAAC,CAAC,EACV,iBAAiB,CAAC,kBAAkB,CAAC;iCAGrC,iBAAiB,CAAC,gBAAgB,CAAC;YANpC,0KAAA,QAAQ,6BAAR,QAAQ,2FAAU;YAIlB,iKAAA,KAAK,6BAAL,KAAK,qFAAU;YAGf,iKAAA,KAAK,6BAAL,KAAK,qFAAU;;;QAPf,QAAQ,2DAAU;QAIlB,KAAK,gHAAU;QAGf,KAAK,6GAAU;;;;;;SAVJ,YAAY"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom decorator created without an extension namespace.
|
|
3
|
+
* The `customDecorator()` no-arg overload produces decorators
|
|
4
|
+
* that are recognized as FormSpec but have no extensionName,
|
|
5
|
+
* so no x-formspec-* keys should be emitted.
|
|
6
|
+
*/
|
|
7
|
+
export declare const Highlight: ((value: undefined, context: ClassFieldDecoratorContext) => void) & import("@formspec/decorators").FormSpecMarkerBrand;
|
|
8
|
+
export declare const Metadata: (_args: {
|
|
9
|
+
key: string;
|
|
10
|
+
}) => (value: undefined, context: ClassFieldDecoratorContext) => void;
|
|
11
|
+
//# sourceMappingURL=example-e-decorators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"example-e-decorators.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/example-e-decorators.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,SAAS,wHAAwC,CAAC;AAC/D,eAAO,MAAM,QAAQ;SAA+B,MAAM;qEAAe,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { customDecorator } from "@formspec/decorators";
|
|
2
|
+
/**
|
|
3
|
+
* Custom decorator created without an extension namespace.
|
|
4
|
+
* The `customDecorator()` no-arg overload produces decorators
|
|
5
|
+
* that are recognized as FormSpec but have no extensionName,
|
|
6
|
+
* so no x-formspec-* keys should be emitted.
|
|
7
|
+
*/
|
|
8
|
+
export const Highlight = customDecorator().marker("Highlight");
|
|
9
|
+
export const Metadata = customDecorator().as("Metadata");
|
|
10
|
+
//# sourceMappingURL=example-e-decorators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"example-e-decorators.js","sourceRoot":"","sources":["../../../src/__tests__/fixtures/example-e-decorators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AAC/D,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,EAAE,CAAC,EAAE,CAAkB,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"example-e-no-namespace.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/example-e-no-namespace.ts"],"names":[],"mappings":"AAGA,qBAAa,YAAY;IAGvB,KAAK,EAAG,MAAM,CAAC;IAIf,KAAK,EAAG,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
2
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
3
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
4
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
5
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
6
|
+
var _, done = false;
|
|
7
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
8
|
+
var context = {};
|
|
9
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
10
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
11
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
12
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
13
|
+
if (kind === "accessor") {
|
|
14
|
+
if (result === void 0) continue;
|
|
15
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
16
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
17
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
18
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
19
|
+
}
|
|
20
|
+
else if (_ = accept(result)) {
|
|
21
|
+
if (kind === "field") initializers.unshift(_);
|
|
22
|
+
else descriptor[key] = _;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
26
|
+
done = true;
|
|
27
|
+
};
|
|
28
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
29
|
+
var useValue = arguments.length > 2;
|
|
30
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
31
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
32
|
+
}
|
|
33
|
+
return useValue ? value : void 0;
|
|
34
|
+
};
|
|
35
|
+
import { Field } from "@formspec/decorators";
|
|
36
|
+
import { Highlight, Metadata } from "./example-e-decorators.js";
|
|
37
|
+
let ExampleEForm = (() => {
|
|
38
|
+
let _title_decorators;
|
|
39
|
+
let _title_initializers = [];
|
|
40
|
+
let _title_extraInitializers = [];
|
|
41
|
+
let _notes_decorators;
|
|
42
|
+
let _notes_initializers = [];
|
|
43
|
+
let _notes_extraInitializers = [];
|
|
44
|
+
return class ExampleEForm {
|
|
45
|
+
static {
|
|
46
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
47
|
+
_title_decorators = [Highlight, Field({ displayName: "Featured Title" })];
|
|
48
|
+
_notes_decorators = [Metadata({ key: "priority" }), Field({ displayName: "Notes" })];
|
|
49
|
+
__esDecorate(null, null, _title_decorators, { kind: "field", name: "title", static: false, private: false, access: { has: obj => "title" in obj, get: obj => obj.title, set: (obj, value) => { obj.title = value; } }, metadata: _metadata }, _title_initializers, _title_extraInitializers);
|
|
50
|
+
__esDecorate(null, null, _notes_decorators, { kind: "field", name: "notes", static: false, private: false, access: { has: obj => "notes" in obj, get: obj => obj.notes, set: (obj, value) => { obj.notes = value; } }, metadata: _metadata }, _notes_initializers, _notes_extraInitializers);
|
|
51
|
+
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
52
|
+
}
|
|
53
|
+
title = __runInitializers(this, _title_initializers, void 0);
|
|
54
|
+
notes = (__runInitializers(this, _title_extraInitializers), __runInitializers(this, _notes_initializers, void 0));
|
|
55
|
+
constructor() {
|
|
56
|
+
__runInitializers(this, _notes_extraInitializers);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
})();
|
|
60
|
+
export { ExampleEForm };
|
|
61
|
+
//# sourceMappingURL=example-e-no-namespace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"example-e-no-namespace.js","sourceRoot":"","sources":["../../../src/__tests__/fixtures/example-e-no-namespace.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;IAEnD,YAAY;;;;;;;iBAAZ,YAAY;;;iCACtB,SAAS,EACT,KAAK,CAAC,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC;iCAGxC,QAAQ,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,EAC7B,KAAK,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;YAHhC,iKAAA,KAAK,6BAAL,KAAK,qFAAU;YAIf,iKAAA,KAAK,6BAAL,KAAK,qFAAU;;;QAJf,KAAK,wDAAU;QAIf,KAAK,6GAAU;;;;;;SAPJ,YAAY"}
|
|
@@ -0,0 +1,102 @@
|
|
|
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
|
+
* @Field_displayName Full Name
|
|
10
|
+
* @Field_description The user's legal name
|
|
11
|
+
* @MinLength 1
|
|
12
|
+
* @MaxLength 200
|
|
13
|
+
*/
|
|
14
|
+
name: string;
|
|
15
|
+
/** @Field_displayName Age @Minimum 0 @Maximum 150 */
|
|
16
|
+
age: number;
|
|
17
|
+
/** @Field_displayName Email @Pattern ^[^@]+@[^@]+$ */
|
|
18
|
+
email?: string;
|
|
19
|
+
/** @Field_displayName Active */
|
|
20
|
+
active: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface WithEnumOptions {
|
|
23
|
+
/**
|
|
24
|
+
* @Field_displayName Status
|
|
25
|
+
* @EnumOptions ["draft","active","archived"]
|
|
26
|
+
*/
|
|
27
|
+
status: "draft" | "active" | "archived";
|
|
28
|
+
/**
|
|
29
|
+
* @Field_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
|
+
/** @Field_displayName Notes */
|
|
38
|
+
notes?: string;
|
|
39
|
+
/** @Field_displayName Tags */
|
|
40
|
+
tags?: string;
|
|
41
|
+
}
|
|
42
|
+
/** @deprecated Use NewConfig instead */
|
|
43
|
+
export interface DeprecatedFieldInterface {
|
|
44
|
+
/** @deprecated Use fullName instead */
|
|
45
|
+
name?: string;
|
|
46
|
+
/** @Field_displayName Full Name */
|
|
47
|
+
fullName: string;
|
|
48
|
+
}
|
|
49
|
+
export type SimpleTypeAlias = {
|
|
50
|
+
/** @Field_displayName Label @MinLength 1 */
|
|
51
|
+
label: string;
|
|
52
|
+
/** @Field_displayName Count @Minimum 0 */
|
|
53
|
+
count: number;
|
|
54
|
+
/** @Field_displayName Description */
|
|
55
|
+
description?: string;
|
|
56
|
+
};
|
|
57
|
+
export type TypeAliasWithEnumOptions = {
|
|
58
|
+
/**
|
|
59
|
+
* @Field_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
|
+
/** @Field_displayName Discount Rate @Field_description Percentage discount applied @Minimum 0 @Maximum 100 */
|
|
71
|
+
export type AnnotatedPercent = number;
|
|
72
|
+
export interface ConfigWithAliasedTypes {
|
|
73
|
+
/** @Field_displayName Discount */
|
|
74
|
+
discount: Percent;
|
|
75
|
+
/** @Field_displayName Contact Email */
|
|
76
|
+
contactEmail: Email;
|
|
77
|
+
/** @Field_displayName Tax Rate */
|
|
78
|
+
taxRate: AnnotatedPercent;
|
|
79
|
+
}
|
|
80
|
+
export interface Address {
|
|
81
|
+
/** @Field_displayName Street @MinLength 1 @MaxLength 200 */
|
|
82
|
+
street: string;
|
|
83
|
+
/** @Field_displayName City @MinLength 1 */
|
|
84
|
+
city: string;
|
|
85
|
+
/** @Field_displayName Zip @Pattern ^[0-9]{5}$ */
|
|
86
|
+
zip?: string;
|
|
87
|
+
}
|
|
88
|
+
export type ContactInfo = {
|
|
89
|
+
/** @Field_displayName Email @Pattern ^[^@]+@[^@]+$ */
|
|
90
|
+
email: string;
|
|
91
|
+
/** @Field_displayName Phone @MaxLength 20 */
|
|
92
|
+
phone?: string;
|
|
93
|
+
};
|
|
94
|
+
export interface NestedConfig {
|
|
95
|
+
/** @Field_displayName Name */
|
|
96
|
+
name: string;
|
|
97
|
+
/** @Field_displayName Address */
|
|
98
|
+
address: Address;
|
|
99
|
+
/** @Field_displayName Contact */
|
|
100
|
+
contact: ContactInfo;
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=example-interface-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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,qDAAqD;IACrD,GAAG,EAAE,MAAM,CAAC;IAEZ,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,gCAAgC;IAChC,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,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wCAAwC;AACxC,MAAM,WAAW,wBAAwB;IACvC,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,mCAAmC;IACnC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAKD,MAAM,MAAM,eAAe,GAAG;IAC5B,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IAEd,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IAEd,qCAAqC;IACrC,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,8GAA8G;AAC9G,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEtC,MAAM,WAAW,sBAAsB;IACrC,kCAAkC;IAClC,QAAQ,EAAE,OAAO,CAAC;IAElB,uCAAuC;IACvC,YAAY,EAAE,KAAK,CAAC;IAEpB,kCAAkC;IAClC,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAID,MAAM,WAAW,OAAO;IACtB,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAGD,MAAM,MAAM,WAAW,GAAG;IACxB,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,iCAAiC;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,iCAAiC;IACjC,OAAO,EAAE,WAAW,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"example-interface-types.js","sourceRoot":"","sources":["../../../src/__tests__/fixtures/example-interface-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare class JSDocConstraintsForm {
|
|
2
|
+
/** @MinLength 1 @MaxLength 200 */
|
|
3
|
+
name: string;
|
|
4
|
+
/** @Minimum 0 @Maximum 150 */
|
|
5
|
+
age: number;
|
|
6
|
+
/** @Minimum 0.01 @Maximum 1000 */
|
|
7
|
+
weight: number;
|
|
8
|
+
/** @Minimum -273.15 */
|
|
9
|
+
temperature: number;
|
|
10
|
+
/** @Pattern ^[A-Z]{3}-\d{4}$ */
|
|
11
|
+
sku: string;
|
|
12
|
+
/** @ExclusiveMaximum 10000 */
|
|
13
|
+
stock: number;
|
|
14
|
+
notes?: string;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=example-jsdoc-constraints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"example-jsdoc-constraints.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/example-jsdoc-constraints.ts"],"names":[],"mappings":"AAEA,qBAAa,oBAAoB;IAC/B,kCAAkC;IAElC,IAAI,EAAG,MAAM,CAAC;IAEd,8BAA8B;IAE9B,GAAG,EAAG,MAAM,CAAC;IAEb,kCAAkC;IAElC,MAAM,EAAG,MAAM,CAAC;IAEhB,uBAAuB;IAEvB,WAAW,EAAG,MAAM,CAAC;IAErB,gCAAgC;IAEhC,GAAG,EAAG,MAAM,CAAC;IAGb,8BAA8B;IAG9B,KAAK,EAAG,MAAM,CAAC;IAIf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
2
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
3
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
4
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
5
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
6
|
+
var _, done = false;
|
|
7
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
8
|
+
var context = {};
|
|
9
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
10
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
11
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
12
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
13
|
+
if (kind === "accessor") {
|
|
14
|
+
if (result === void 0) continue;
|
|
15
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
16
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
17
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
18
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
19
|
+
}
|
|
20
|
+
else if (_ = accept(result)) {
|
|
21
|
+
if (kind === "field") initializers.unshift(_);
|
|
22
|
+
else descriptor[key] = _;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
26
|
+
done = true;
|
|
27
|
+
};
|
|
28
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
29
|
+
var useValue = arguments.length > 2;
|
|
30
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
31
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
32
|
+
}
|
|
33
|
+
return useValue ? value : void 0;
|
|
34
|
+
};
|
|
35
|
+
import { Field, Minimum } from "@formspec/decorators";
|
|
36
|
+
let JSDocConstraintsForm = (() => {
|
|
37
|
+
let _name_decorators;
|
|
38
|
+
let _name_initializers = [];
|
|
39
|
+
let _name_extraInitializers = [];
|
|
40
|
+
let _age_decorators;
|
|
41
|
+
let _age_initializers = [];
|
|
42
|
+
let _age_extraInitializers = [];
|
|
43
|
+
let _weight_decorators;
|
|
44
|
+
let _weight_initializers = [];
|
|
45
|
+
let _weight_extraInitializers = [];
|
|
46
|
+
let _temperature_decorators;
|
|
47
|
+
let _temperature_initializers = [];
|
|
48
|
+
let _temperature_extraInitializers = [];
|
|
49
|
+
let _sku_decorators;
|
|
50
|
+
let _sku_initializers = [];
|
|
51
|
+
let _sku_extraInitializers = [];
|
|
52
|
+
let _stock_decorators;
|
|
53
|
+
let _stock_initializers = [];
|
|
54
|
+
let _stock_extraInitializers = [];
|
|
55
|
+
let _notes_decorators;
|
|
56
|
+
let _notes_initializers = [];
|
|
57
|
+
let _notes_extraInitializers = [];
|
|
58
|
+
return class JSDocConstraintsForm {
|
|
59
|
+
static {
|
|
60
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
61
|
+
_name_decorators = [Field({ displayName: "Name" })];
|
|
62
|
+
_age_decorators = [Field({ displayName: "Age" })];
|
|
63
|
+
_weight_decorators = [Field({ displayName: "Weight" })];
|
|
64
|
+
_temperature_decorators = [Field({ displayName: "Temperature" })];
|
|
65
|
+
_sku_decorators = [Field({ displayName: "SKU" })];
|
|
66
|
+
_stock_decorators = [Field({ displayName: "Stock" }), Minimum(0)];
|
|
67
|
+
_notes_decorators = [Field({ displayName: "Notes" })];
|
|
68
|
+
__esDecorate(null, null, _name_decorators, { kind: "field", name: "name", static: false, private: false, access: { has: obj => "name" in obj, get: obj => obj.name, set: (obj, value) => { obj.name = value; } }, metadata: _metadata }, _name_initializers, _name_extraInitializers);
|
|
69
|
+
__esDecorate(null, null, _age_decorators, { kind: "field", name: "age", static: false, private: false, access: { has: obj => "age" in obj, get: obj => obj.age, set: (obj, value) => { obj.age = value; } }, metadata: _metadata }, _age_initializers, _age_extraInitializers);
|
|
70
|
+
__esDecorate(null, null, _weight_decorators, { kind: "field", name: "weight", static: false, private: false, access: { has: obj => "weight" in obj, get: obj => obj.weight, set: (obj, value) => { obj.weight = value; } }, metadata: _metadata }, _weight_initializers, _weight_extraInitializers);
|
|
71
|
+
__esDecorate(null, null, _temperature_decorators, { kind: "field", name: "temperature", static: false, private: false, access: { has: obj => "temperature" in obj, get: obj => obj.temperature, set: (obj, value) => { obj.temperature = value; } }, metadata: _metadata }, _temperature_initializers, _temperature_extraInitializers);
|
|
72
|
+
__esDecorate(null, null, _sku_decorators, { kind: "field", name: "sku", static: false, private: false, access: { has: obj => "sku" in obj, get: obj => obj.sku, set: (obj, value) => { obj.sku = value; } }, metadata: _metadata }, _sku_initializers, _sku_extraInitializers);
|
|
73
|
+
__esDecorate(null, null, _stock_decorators, { kind: "field", name: "stock", static: false, private: false, access: { has: obj => "stock" in obj, get: obj => obj.stock, set: (obj, value) => { obj.stock = value; } }, metadata: _metadata }, _stock_initializers, _stock_extraInitializers);
|
|
74
|
+
__esDecorate(null, null, _notes_decorators, { kind: "field", name: "notes", static: false, private: false, access: { has: obj => "notes" in obj, get: obj => obj.notes, set: (obj, value) => { obj.notes = value; } }, metadata: _metadata }, _notes_initializers, _notes_extraInitializers);
|
|
75
|
+
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
76
|
+
}
|
|
77
|
+
/** @MinLength 1 @MaxLength 200 */
|
|
78
|
+
name = __runInitializers(this, _name_initializers, void 0);
|
|
79
|
+
/** @Minimum 0 @Maximum 150 */
|
|
80
|
+
age = (__runInitializers(this, _name_extraInitializers), __runInitializers(this, _age_initializers, void 0));
|
|
81
|
+
/** @Minimum 0.01 @Maximum 1000 */
|
|
82
|
+
weight = (__runInitializers(this, _age_extraInitializers), __runInitializers(this, _weight_initializers, void 0));
|
|
83
|
+
/** @Minimum -273.15 */
|
|
84
|
+
temperature = (__runInitializers(this, _weight_extraInitializers), __runInitializers(this, _temperature_initializers, void 0));
|
|
85
|
+
/** @Pattern ^[A-Z]{3}-\d{4}$ */
|
|
86
|
+
sku = (__runInitializers(this, _temperature_extraInitializers), __runInitializers(this, _sku_initializers, void 0));
|
|
87
|
+
// Cross-source: decorator for one, JSDoc for another
|
|
88
|
+
/** @ExclusiveMaximum 10000 */
|
|
89
|
+
stock = (__runInitializers(this, _sku_extraInitializers), __runInitializers(this, _stock_initializers, void 0));
|
|
90
|
+
// No constraints
|
|
91
|
+
notes = (__runInitializers(this, _stock_extraInitializers), __runInitializers(this, _notes_initializers, void 0));
|
|
92
|
+
constructor() {
|
|
93
|
+
__runInitializers(this, _notes_extraInitializers);
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
})();
|
|
97
|
+
export { JSDocConstraintsForm };
|
|
98
|
+
//# sourceMappingURL=example-jsdoc-constraints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"example-jsdoc-constraints.js","sourceRoot":"","sources":["../../../src/__tests__/fixtures/example-jsdoc-constraints.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;IAEzC,oBAAoB;;;;;;;;;;;;;;;;;;;;;;iBAApB,oBAAoB;;;gCAE9B,KAAK,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC;+BAI9B,KAAK,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;kCAI7B,KAAK,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;uCAIhC,KAAK,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC;+BAIrC,KAAK,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;iCAK7B,KAAK,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,EAC/B,OAAO,CAAC,CAAC,CAAC;iCAIV,KAAK,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;YAzBhC,8JAAA,IAAI,6BAAJ,IAAI,mFAAU;YAId,2JAAA,GAAG,6BAAH,GAAG,iFAAU;YAIb,oKAAA,MAAM,6BAAN,MAAM,uFAAU;YAIhB,mLAAA,WAAW,6BAAX,WAAW,iGAAU;YAIrB,2JAAA,GAAG,6BAAH,GAAG,iFAAU;YAMb,iKAAA,KAAK,6BAAL,KAAK,qFAAU;YAIf,iKAAA,KAAK,6BAAL,KAAK,qFAAU;;;QA5Bf,kCAAkC;QAElC,IAAI,uDAAU;QAEd,8BAA8B;QAE9B,GAAG,0GAAU;QAEb,kCAAkC;QAElC,MAAM,4GAAU;QAEhB,uBAAuB;QAEvB,WAAW,oHAAU;QAErB,gCAAgC;QAEhC,GAAG,iHAAU;QAEb,qDAAqD;QACrD,8BAA8B;QAG9B,KAAK,2GAAU;QAEf,iBAAiB;QAEjB,KAAK,6GAAU;;;;;;SA7BJ,oBAAoB"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export declare class Address {
|
|
2
|
+
street: string;
|
|
3
|
+
city: string;
|
|
4
|
+
zip?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class Dimensions {
|
|
7
|
+
/** @Minimum 0 @Maximum 10000 */
|
|
8
|
+
width: number;
|
|
9
|
+
/** @Minimum 0 @Maximum 10000 */
|
|
10
|
+
height: number;
|
|
11
|
+
/** @Minimum 0 */
|
|
12
|
+
depth: number;
|
|
13
|
+
}
|
|
14
|
+
export declare class UserWithAddress {
|
|
15
|
+
username: string;
|
|
16
|
+
address: Address;
|
|
17
|
+
}
|
|
18
|
+
export declare class ProductWithDimensions {
|
|
19
|
+
name: string;
|
|
20
|
+
dimensions: Dimensions;
|
|
21
|
+
}
|
|
22
|
+
export declare class Customer {
|
|
23
|
+
name: string;
|
|
24
|
+
address: Address;
|
|
25
|
+
}
|
|
26
|
+
export declare class Order {
|
|
27
|
+
orderId: string;
|
|
28
|
+
customer: Customer;
|
|
29
|
+
}
|
|
30
|
+
export declare class NodeA {
|
|
31
|
+
name: string;
|
|
32
|
+
sibling?: NodeB;
|
|
33
|
+
}
|
|
34
|
+
export declare class NodeB {
|
|
35
|
+
label: string;
|
|
36
|
+
sibling?: NodeA;
|
|
37
|
+
}
|
|
38
|
+
export declare class WithInlineObject {
|
|
39
|
+
title: string;
|
|
40
|
+
metadata: {
|
|
41
|
+
key: string;
|
|
42
|
+
value: string;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=example-nested-class.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"example-nested-class.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/example-nested-class.ts"],"names":[],"mappings":"AAIA,qBAAa,OAAO;IAIlB,MAAM,EAAG,MAAM,CAAC;IAIhB,IAAI,EAAG,MAAM,CAAC;IAId,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,qBAAa,UAAU;IACrB,gCAAgC;IAEhC,KAAK,EAAG,MAAM,CAAC;IAEf,gCAAgC;IAEhC,MAAM,EAAG,MAAM,CAAC;IAEhB,iBAAiB;IAEjB,KAAK,EAAG,MAAM,CAAC;CAChB;AAID,qBAAa,eAAe;IAG1B,QAAQ,EAAG,MAAM,CAAC;IAGlB,OAAO,EAAG,OAAO,CAAC;CACnB;AAED,qBAAa,qBAAqB;IAEhC,IAAI,EAAG,MAAM,CAAC;IAGd,UAAU,EAAG,UAAU,CAAC;CACzB;AAID,qBAAa,QAAQ;IAGnB,IAAI,EAAG,MAAM,CAAC;IAGd,OAAO,EAAG,OAAO,CAAC;CACnB;AAED,qBAAa,KAAK;IAEhB,OAAO,EAAG,MAAM,CAAC;IAGjB,QAAQ,EAAG,QAAQ,CAAC;CACrB;AAID,qBAAa,KAAK;IAGhB,IAAI,EAAG,MAAM,CAAC;IAEd,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB;AAED,qBAAa,KAAK;IAEhB,KAAK,EAAG,MAAM,CAAC;IAEf,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB;AAID,qBAAa,gBAAgB;IAE3B,KAAK,EAAG,MAAM,CAAC;IAEf,QAAQ,EAAG;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3C"}
|