@formspec/build 0.1.0-alpha.10 → 0.1.0-alpha.12
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 +51 -15
- package/dist/__tests__/chain-dsl-canonicalizer.test.d.ts +2 -0
- package/dist/__tests__/chain-dsl-canonicalizer.test.d.ts.map +1 -0
- package/dist/__tests__/constraint-validator.test.d.ts +2 -0
- package/dist/__tests__/constraint-validator.test.d.ts.map +1 -0
- package/dist/__tests__/extension-api.test.d.ts +2 -0
- package/dist/__tests__/extension-api.test.d.ts.map +1 -0
- package/dist/__tests__/fixtures/example-a-builtins.d.ts +18 -0
- package/dist/__tests__/fixtures/example-a-builtins.d.ts.map +1 -1
- package/dist/__tests__/ir-analyzer.test.d.ts +11 -0
- package/dist/__tests__/ir-analyzer.test.d.ts.map +1 -0
- package/dist/__tests__/ir-jsdoc-constraints.test.d.ts +12 -0
- package/dist/__tests__/ir-jsdoc-constraints.test.d.ts.map +1 -0
- package/dist/__tests__/ir-json-schema-generator.test.d.ts +11 -0
- package/dist/__tests__/ir-json-schema-generator.test.d.ts.map +1 -0
- package/dist/__tests__/ir-ui-schema-generator.test.d.ts +2 -0
- package/dist/__tests__/ir-ui-schema-generator.test.d.ts.map +1 -0
- package/dist/__tests__/jsdoc-constraints.test.d.ts +4 -4
- package/dist/__tests__/parity/fixtures/address/chain-dsl.d.ts +9 -0
- package/dist/__tests__/parity/fixtures/address/chain-dsl.d.ts.map +1 -0
- package/dist/__tests__/parity/fixtures/address/expected-ir.d.ts +9 -0
- package/dist/__tests__/parity/fixtures/address/expected-ir.d.ts.map +1 -0
- package/dist/__tests__/parity/fixtures/address/tsdoc.d.ts +19 -0
- package/dist/__tests__/parity/fixtures/address/tsdoc.d.ts.map +1 -0
- package/dist/__tests__/parity/fixtures/product-config/chain-dsl.d.ts +13 -0
- package/dist/__tests__/parity/fixtures/product-config/chain-dsl.d.ts.map +1 -0
- package/dist/__tests__/parity/fixtures/product-config/expected-ir.d.ts +9 -0
- package/dist/__tests__/parity/fixtures/product-config/expected-ir.d.ts.map +1 -0
- package/dist/__tests__/parity/fixtures/product-config/tsdoc.d.ts +28 -0
- package/dist/__tests__/parity/fixtures/product-config/tsdoc.d.ts.map +1 -0
- package/dist/__tests__/parity/fixtures/user-registration/chain-dsl.d.ts +12 -0
- package/dist/__tests__/parity/fixtures/user-registration/chain-dsl.d.ts.map +1 -0
- package/dist/__tests__/parity/fixtures/user-registration/expected-ir.d.ts +9 -0
- package/dist/__tests__/parity/fixtures/user-registration/expected-ir.d.ts.map +1 -0
- package/dist/__tests__/parity/fixtures/user-registration/tsdoc.d.ts +19 -0
- package/dist/__tests__/parity/fixtures/user-registration/tsdoc.d.ts.map +1 -0
- package/dist/__tests__/parity/parity.test.d.ts +14 -0
- package/dist/__tests__/parity/parity.test.d.ts.map +1 -0
- package/dist/__tests__/parity/utils.d.ts +139 -0
- package/dist/__tests__/parity/utils.d.ts.map +1 -0
- package/dist/analyzer/class-analyzer.d.ts +54 -99
- package/dist/analyzer/class-analyzer.d.ts.map +1 -1
- package/dist/analyzer/jsdoc-constraints.d.ts +78 -30
- package/dist/analyzer/jsdoc-constraints.d.ts.map +1 -1
- package/dist/analyzer/tsdoc-parser.d.ts +61 -0
- package/dist/analyzer/tsdoc-parser.d.ts.map +1 -0
- package/dist/browser.cjs +1200 -0
- package/dist/browser.cjs.map +1 -0
- package/dist/browser.d.ts +12 -6
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +1147 -44
- package/dist/browser.js.map +1 -1
- package/dist/build.d.ts +385 -160
- package/dist/canonicalize/chain-dsl-canonicalizer.d.ts +18 -0
- package/dist/canonicalize/chain-dsl-canonicalizer.d.ts.map +1 -0
- package/dist/canonicalize/index.d.ts +8 -0
- package/dist/canonicalize/index.d.ts.map +1 -0
- package/dist/canonicalize/tsdoc-canonicalizer.d.ts +34 -0
- package/dist/canonicalize/tsdoc-canonicalizer.d.ts.map +1 -0
- package/dist/cli.cjs +2028 -0
- package/dist/cli.cjs.map +1 -0
- package/dist/cli.js +1978 -101
- package/dist/cli.js.map +1 -1
- package/dist/extensions/index.d.ts +8 -0
- package/dist/extensions/index.d.ts.map +1 -0
- package/dist/extensions/registry.d.ts +55 -0
- package/dist/extensions/registry.d.ts.map +1 -0
- package/dist/generators/class-schema.d.ts +28 -47
- package/dist/generators/class-schema.d.ts.map +1 -1
- package/dist/generators/method-schema.d.ts +6 -8
- package/dist/generators/method-schema.d.ts.map +1 -1
- package/dist/index.cjs +1832 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +8 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1779 -114
- package/dist/index.js.map +1 -1
- package/dist/internals.cjs +2125 -0
- package/dist/internals.cjs.map +1 -0
- package/dist/internals.d.ts +12 -2
- package/dist/internals.d.ts.map +1 -1
- package/dist/internals.js +2084 -21
- package/dist/internals.js.map +1 -1
- package/dist/json-schema/generator.d.ts +10 -5
- package/dist/json-schema/generator.d.ts.map +1 -1
- package/dist/json-schema/ir-generator.d.ts +84 -0
- package/dist/json-schema/ir-generator.d.ts.map +1 -0
- package/dist/json-schema/schema.d.ts +16 -0
- package/dist/json-schema/schema.d.ts.map +1 -0
- package/dist/json-schema/types.d.ts +5 -6
- package/dist/json-schema/types.d.ts.map +1 -1
- package/dist/ui-schema/generator.d.ts +5 -0
- package/dist/ui-schema/generator.d.ts.map +1 -1
- package/dist/ui-schema/ir-generator.d.ts +53 -0
- package/dist/ui-schema/ir-generator.d.ts.map +1 -0
- package/dist/ui-schema/schema.d.ts +357 -0
- package/dist/ui-schema/schema.d.ts.map +1 -0
- package/dist/ui-schema/types.d.ts +8 -73
- package/dist/ui-schema/types.d.ts.map +1 -1
- package/dist/validate/constraint-validator.d.ts +66 -0
- package/dist/validate/constraint-validator.d.ts.map +1 -0
- package/dist/validate/index.d.ts +9 -0
- package/dist/validate/index.d.ts.map +1 -0
- package/package.json +15 -9
- package/dist/__tests__/analyzer-edge-cases.test.d.ts +0 -13
- package/dist/__tests__/analyzer-edge-cases.test.d.ts.map +0 -1
- package/dist/__tests__/analyzer-edge-cases.test.js +0 -376
- package/dist/__tests__/analyzer-edge-cases.test.js.map +0 -1
- package/dist/__tests__/analyzer.test.d.ts +0 -5
- package/dist/__tests__/analyzer.test.d.ts.map +0 -1
- package/dist/__tests__/analyzer.test.js +0 -190
- package/dist/__tests__/analyzer.test.js.map +0 -1
- package/dist/__tests__/cli.test.js +0 -178
- package/dist/__tests__/cli.test.js.map +0 -1
- package/dist/__tests__/codegen.test.d.ts +0 -5
- package/dist/__tests__/codegen.test.d.ts.map +0 -1
- package/dist/__tests__/codegen.test.js +0 -506
- package/dist/__tests__/codegen.test.js.map +0 -1
- package/dist/__tests__/decorator-pipeline.test.d.ts +0 -11
- package/dist/__tests__/decorator-pipeline.test.d.ts.map +0 -1
- package/dist/__tests__/decorator-pipeline.test.js +0 -460
- package/dist/__tests__/decorator-pipeline.test.js.map +0 -1
- package/dist/__tests__/edge-cases.test.js +0 -215
- package/dist/__tests__/edge-cases.test.js.map +0 -1
- package/dist/__tests__/fixtures/edge-cases.js +0 -137
- package/dist/__tests__/fixtures/edge-cases.js.map +0 -1
- package/dist/__tests__/fixtures/example-a-builtins.js +0 -100
- package/dist/__tests__/fixtures/example-a-builtins.js.map +0 -1
- package/dist/__tests__/fixtures/example-b-decorators.d.ts +0 -5
- package/dist/__tests__/fixtures/example-b-decorators.d.ts.map +0 -1
- package/dist/__tests__/fixtures/example-b-decorators.js +0 -5
- package/dist/__tests__/fixtures/example-b-decorators.js.map +0 -1
- package/dist/__tests__/fixtures/example-b-extended.d.ts +0 -5
- package/dist/__tests__/fixtures/example-b-extended.d.ts.map +0 -1
- package/dist/__tests__/fixtures/example-b-extended.js +0 -60
- package/dist/__tests__/fixtures/example-b-extended.js.map +0 -1
- package/dist/__tests__/fixtures/example-c-custom.d.ts +0 -5
- package/dist/__tests__/fixtures/example-c-custom.d.ts.map +0 -1
- package/dist/__tests__/fixtures/example-c-custom.js +0 -61
- package/dist/__tests__/fixtures/example-c-custom.js.map +0 -1
- package/dist/__tests__/fixtures/example-c-decorators.d.ts +0 -5
- package/dist/__tests__/fixtures/example-c-decorators.d.ts.map +0 -1
- package/dist/__tests__/fixtures/example-c-decorators.js +0 -4
- package/dist/__tests__/fixtures/example-c-decorators.js.map +0 -1
- package/dist/__tests__/fixtures/example-d-mixed-decorators.d.ts +0 -6
- package/dist/__tests__/fixtures/example-d-mixed-decorators.d.ts.map +0 -1
- package/dist/__tests__/fixtures/example-d-mixed-decorators.js +0 -75
- package/dist/__tests__/fixtures/example-d-mixed-decorators.js.map +0 -1
- package/dist/__tests__/fixtures/example-e-decorators.d.ts +0 -11
- package/dist/__tests__/fixtures/example-e-decorators.d.ts.map +0 -1
- package/dist/__tests__/fixtures/example-e-decorators.js +0 -10
- package/dist/__tests__/fixtures/example-e-decorators.js.map +0 -1
- package/dist/__tests__/fixtures/example-e-no-namespace.d.ts +0 -5
- package/dist/__tests__/fixtures/example-e-no-namespace.d.ts.map +0 -1
- package/dist/__tests__/fixtures/example-e-no-namespace.js +0 -61
- package/dist/__tests__/fixtures/example-e-no-namespace.js.map +0 -1
- package/dist/__tests__/fixtures/example-interface-types.js +0 -8
- package/dist/__tests__/fixtures/example-interface-types.js.map +0 -1
- package/dist/__tests__/fixtures/example-jsdoc-constraints.d.ts +0 -16
- package/dist/__tests__/fixtures/example-jsdoc-constraints.d.ts.map +0 -1
- package/dist/__tests__/fixtures/example-jsdoc-constraints.js +0 -98
- package/dist/__tests__/fixtures/example-jsdoc-constraints.js.map +0 -1
- package/dist/__tests__/fixtures/example-nested-class.d.ts +0 -45
- package/dist/__tests__/fixtures/example-nested-class.d.ts.map +0 -1
- package/dist/__tests__/fixtures/example-nested-class.js +0 -248
- package/dist/__tests__/fixtures/example-nested-class.js.map +0 -1
- package/dist/__tests__/fixtures/sample-forms.js +0 -78
- package/dist/__tests__/fixtures/sample-forms.js.map +0 -1
- package/dist/__tests__/generator.test.js +0 -234
- package/dist/__tests__/generator.test.js.map +0 -1
- package/dist/__tests__/integration.test.js +0 -161
- package/dist/__tests__/integration.test.js.map +0 -1
- package/dist/__tests__/interface-types.test.d.ts +0 -11
- package/dist/__tests__/interface-types.test.d.ts.map +0 -1
- package/dist/__tests__/interface-types.test.js +0 -404
- package/dist/__tests__/interface-types.test.js.map +0 -1
- package/dist/__tests__/jsdoc-constraints.test.js +0 -465
- package/dist/__tests__/jsdoc-constraints.test.js.map +0 -1
- package/dist/__tests__/write-schemas.test.js +0 -198
- package/dist/__tests__/write-schemas.test.js.map +0 -1
- package/dist/analyzer/class-analyzer.js +0 -377
- package/dist/analyzer/class-analyzer.js.map +0 -1
- package/dist/analyzer/decorator-extractor.d.ts +0 -78
- package/dist/analyzer/decorator-extractor.d.ts.map +0 -1
- package/dist/analyzer/decorator-extractor.js +0 -336
- package/dist/analyzer/decorator-extractor.js.map +0 -1
- package/dist/analyzer/jsdoc-constraints.js +0 -153
- package/dist/analyzer/jsdoc-constraints.js.map +0 -1
- package/dist/analyzer/program.js +0 -114
- package/dist/analyzer/program.js.map +0 -1
- package/dist/analyzer/type-converter.d.ts +0 -75
- package/dist/analyzer/type-converter.d.ts.map +0 -1
- package/dist/analyzer/type-converter.js +0 -474
- package/dist/analyzer/type-converter.js.map +0 -1
- package/dist/codegen/index.d.ts +0 -75
- package/dist/codegen/index.d.ts.map +0 -1
- package/dist/codegen/index.js +0 -597
- package/dist/codegen/index.js.map +0 -1
- package/dist/generators/class-schema.js +0 -140
- package/dist/generators/class-schema.js.map +0 -1
- package/dist/generators/method-schema.js +0 -108
- package/dist/generators/method-schema.js.map +0 -1
- package/dist/json-schema/generator.js +0 -166
- package/dist/json-schema/generator.js.map +0 -1
- package/dist/json-schema/types.js +0 -33
- package/dist/json-schema/types.js.map +0 -1
- package/dist/ui-schema/generator.js +0 -148
- package/dist/ui-schema/generator.js.map +0 -1
- package/dist/ui-schema/types.js +0 -8
- package/dist/ui-schema/types.js.map +0 -1
|
@@ -1,61 +0,0 @@
|
|
|
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
|
-
import { Title, Priority } from "./example-c-decorators.js";
|
|
37
|
-
let ExampleCForm = (() => {
|
|
38
|
-
let _heading_decorators;
|
|
39
|
-
let _heading_initializers = [];
|
|
40
|
-
let _heading_extraInitializers = [];
|
|
41
|
-
let _urgency_decorators;
|
|
42
|
-
let _urgency_initializers = [];
|
|
43
|
-
let _urgency_extraInitializers = [];
|
|
44
|
-
return class ExampleCForm {
|
|
45
|
-
static {
|
|
46
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
47
|
-
_heading_decorators = [Title, Field({ displayName: "Heading" })];
|
|
48
|
-
_urgency_decorators = [Priority({ level: "high" }), Field({ displayName: "Urgency Score" }), Minimum(1)];
|
|
49
|
-
__esDecorate(null, null, _heading_decorators, { kind: "field", name: "heading", static: false, private: false, access: { has: obj => "heading" in obj, get: obj => obj.heading, set: (obj, value) => { obj.heading = value; } }, metadata: _metadata }, _heading_initializers, _heading_extraInitializers);
|
|
50
|
-
__esDecorate(null, null, _urgency_decorators, { kind: "field", name: "urgency", static: false, private: false, access: { has: obj => "urgency" in obj, get: obj => obj.urgency, set: (obj, value) => { obj.urgency = value; } }, metadata: _metadata }, _urgency_initializers, _urgency_extraInitializers);
|
|
51
|
-
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
52
|
-
}
|
|
53
|
-
heading = __runInitializers(this, _heading_initializers, void 0);
|
|
54
|
-
urgency = (__runInitializers(this, _heading_extraInitializers), __runInitializers(this, _urgency_initializers, void 0));
|
|
55
|
-
constructor() {
|
|
56
|
-
__runInitializers(this, _urgency_extraInitializers);
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
})();
|
|
60
|
-
export { ExampleCForm };
|
|
61
|
-
//# sourceMappingURL=example-c-custom.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-c-custom.js","sourceRoot":"","sources":["../../../src/__tests__/fixtures/example-c-custom.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;IAE/C,YAAY;;;;;;;iBAAZ,YAAY;;;mCACtB,KAAK,EACL,KAAK,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC;mCAGjC,QAAQ,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAC3B,KAAK,CAAC,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC,EACvC,OAAO,CAAC,CAAC,CAAC;YAJX,uKAAA,OAAO,6BAAP,OAAO,yFAAU;YAKjB,uKAAA,OAAO,6BAAP,OAAO,yFAAU;;;QALjB,OAAO,0DAAU;QAKjB,OAAO,iHAAU;;;;;;SARN,YAAY"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const Title: ((value: undefined, context: ClassFieldDecoratorContext) => void) & import("@formspec/decorators").FormSpecMarkerBrand & import("@formspec/decorators").FormSpecExtensionBrand<"title-field">;
|
|
2
|
-
export declare const Priority: ((_args: {
|
|
3
|
-
level: string;
|
|
4
|
-
}) => (value: undefined, context: ClassFieldDecoratorContext) => void) & import("@formspec/decorators").FormSpecExtensionBrand<"priority">;
|
|
5
|
-
//# sourceMappingURL=example-c-decorators.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-c-decorators.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/example-c-decorators.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,+LAAiD,CAAC;AACpE,eAAO,MAAM,QAAQ;WAA2C,MAAM;0IAAe,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-c-decorators.js","sourceRoot":"","sources":["../../../src/__tests__/fixtures/example-c-decorators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,MAAM,CAAC,MAAM,KAAK,GAAG,eAAe,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACpE,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC,EAAE,CAAoB,UAAU,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-d-mixed-decorators.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/example-d-mixed-decorators.ts"],"names":[],"mappings":"AAYA,qBAAa,YAAY;IAGvB,QAAQ,EAAG,MAAM,CAAC;IAIlB,KAAK,EAAG,MAAM,CAAC;IAGf,KAAK,EAAG,MAAM,CAAC;CAChB"}
|
|
@@ -1,75 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,61 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-interface-types.js","sourceRoot":"","sources":["../../../src/__tests__/fixtures/example-interface-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -1,16 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,98 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,45 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|