From 8c57874eb140c26f8c85e8292c527d9718256b9f Mon Sep 17 00:00:00 2001 From: Franklin Davenport Date: Wed, 20 Sep 2017 13:41:34 -0500 Subject: [PATCH 01/11] no need for root index file to be compiled --- index.d.ts | 1 + index.js | 16 ++++------------ index.js.map | 1 - index.ts | 5 ----- src/index.d.ts | 5 +++++ src/index.js | 14 ++++++++++++++ src/index.js.map | 1 + src/index.ts | 5 +++++ 8 files changed, 30 insertions(+), 18 deletions(-) create mode 100644 index.d.ts delete mode 100644 index.js.map delete mode 100644 index.ts create mode 100644 src/index.d.ts create mode 100644 src/index.js create mode 100644 src/index.js.map create mode 100644 src/index.ts diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..e910bb0 --- /dev/null +++ b/index.d.ts @@ -0,0 +1 @@ +export * from "./src/index"; diff --git a/index.js b/index.js index bcd429e..f43f341 100644 --- a/index.js +++ b/index.js @@ -1,14 +1,6 @@ "use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} Object.defineProperty(exports, "__esModule", { value: true }); -var json_convert_1 = require("./src/json2typescript/json-convert"); -exports.JsonConvert = json_convert_1.JsonConvert; -var json_convert_enums_1 = require("./src/json2typescript/json-convert-enums"); -exports.ValueCheckingMode = json_convert_enums_1.ValueCheckingMode; -exports.OperationMode = json_convert_enums_1.OperationMode; -var json_convert_decorators_1 = require("./src/json2typescript/json-convert-decorators"); -exports.JsonObject = json_convert_decorators_1.JsonObject; -exports.JsonProperty = json_convert_decorators_1.JsonProperty; -exports.JsonConverter = json_convert_decorators_1.JsonConverter; -var any_1 = require("./src/json2typescript/any"); -exports.Any = any_1.Any; -//# sourceMappingURL=/Users/andreas/Documents/GIT/appvision@git.appvision.ch/unibasel/json2typescript/index.js.map \ No newline at end of file +__export(require("./src/index")); diff --git a/index.js.map b/index.js.map deleted file mode 100644 index a64bac4..0000000 --- a/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;AAAA,mEAAiE;AAAxD,qCAAA,WAAW,CAAA;AAEpB,+EAA4F;AAAnF,iDAAA,iBAAiB,CAAA;AAAE,6CAAA,aAAa,CAAA;AACzC,yFAAwG;AAA/F,+CAAA,UAAU,CAAA;AAAE,iDAAA,YAAY,CAAA;AAAE,kDAAA,aAAa,CAAA;AAChD,iDAAgD;AAAvC,oBAAA,GAAG,CAAA"} \ No newline at end of file diff --git a/index.ts b/index.ts deleted file mode 100644 index 6289ac6..0000000 --- a/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { JsonConvert } from "./src/json2typescript/json-convert"; -export { JsonCustomConvert } from "./src/json2typescript/json-custom-convert"; -export { ValueCheckingMode, OperationMode } from "./src/json2typescript/json-convert-enums"; -export { JsonObject, JsonProperty, JsonConverter } from "./src/json2typescript/json-convert-decorators"; -export { Any } from "./src/json2typescript/any"; \ No newline at end of file diff --git a/src/index.d.ts b/src/index.d.ts new file mode 100644 index 0000000..75b6fa0 --- /dev/null +++ b/src/index.d.ts @@ -0,0 +1,5 @@ +export { JsonConvert } from "./json2typescript/json-convert"; +export { JsonCustomConvert } from "./json2typescript/json-custom-convert"; +export { ValueCheckingMode, OperationMode } from "./json2typescript/json-convert-enums"; +export { JsonObject, JsonProperty, JsonConverter } from "./json2typescript/json-convert-decorators"; +export { Any } from "./json2typescript/any"; diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..3ac82c4 --- /dev/null +++ b/src/index.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var json_convert_1 = require("./json2typescript/json-convert"); +exports.JsonConvert = json_convert_1.JsonConvert; +var json_convert_enums_1 = require("./json2typescript/json-convert-enums"); +exports.ValueCheckingMode = json_convert_enums_1.ValueCheckingMode; +exports.OperationMode = json_convert_enums_1.OperationMode; +var json_convert_decorators_1 = require("./json2typescript/json-convert-decorators"); +exports.JsonObject = json_convert_decorators_1.JsonObject; +exports.JsonProperty = json_convert_decorators_1.JsonProperty; +exports.JsonConverter = json_convert_decorators_1.JsonConverter; +var any_1 = require("./json2typescript/any"); +exports.Any = any_1.Any; +//# sourceMappingURL=D:/files/work/mc/prime/www/json2typescript/index.js.map \ No newline at end of file diff --git a/src/index.js.map b/src/index.js.map new file mode 100644 index 0000000..33bd93a --- /dev/null +++ b/src/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";;AAAA,+DAA6D;AAApD,qCAAA,WAAW,CAAA;AAEpB,2EAAwF;AAA/E,iDAAA,iBAAiB,CAAA;AAAE,6CAAA,aAAa,CAAA;AACzC,qFAAoG;AAA3F,+CAAA,UAAU,CAAA;AAAE,iDAAA,YAAY,CAAA;AAAE,kDAAA,aAAa,CAAA;AAChD,6CAA4C;AAAnC,oBAAA,GAAG,CAAA"} \ No newline at end of file diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..5f5fe31 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,5 @@ +export { JsonConvert } from "./json2typescript/json-convert"; +export { JsonCustomConvert } from "./json2typescript/json-custom-convert"; +export { ValueCheckingMode, OperationMode } from "./json2typescript/json-convert-enums"; +export { JsonObject, JsonProperty, JsonConverter } from "./json2typescript/json-convert-decorators"; +export { Any } from "./json2typescript/any"; \ No newline at end of file From c626f4c0962085323f27d1ec0e7697333ba8f4f3 Mon Sep 17 00:00:00 2001 From: Franklin Davenport Date: Wed, 20 Sep 2017 13:44:05 -0500 Subject: [PATCH 02/11] tsconfig: set enavle strict null checks --- src/json2typescript/any.js | 2 +- src/json2typescript/any.js.map | 2 +- src/json2typescript/json-convert-decorators.js.map | 2 +- src/json2typescript/json-convert-enums.js | 2 +- src/json2typescript/json-convert-enums.js.map | 2 +- src/json2typescript/json-convert-options.js | 2 +- src/json2typescript/json-convert-options.js.map | 2 +- src/json2typescript/json-convert-options.ts | 2 +- src/json2typescript/json-convert.js | 6 +++--- src/json2typescript/json-convert.js.map | 2 +- src/json2typescript/json-convert.ts | 10 +++++----- src/json2typescript/json-custom-convert.js | 2 +- src/json2typescript/json-custom-convert.js.map | 2 +- tsconfig.json | 7 ++++--- 14 files changed, 23 insertions(+), 22 deletions(-) diff --git a/src/json2typescript/any.js b/src/json2typescript/any.js index 8ec23ba..03a0391 100644 --- a/src/json2typescript/any.js +++ b/src/json2typescript/any.js @@ -6,4 +6,4 @@ var Any = (function () { return Any; }()); exports.Any = Any; -//# sourceMappingURL=/Users/andreas/Documents/GIT/appvision@git.appvision.ch/unibasel/json2typescript/src/json2typescript/any.js.map \ No newline at end of file +//# sourceMappingURL=D:/files/work/mc/prime/www/json2typescript/json2typescript/any.js.map \ No newline at end of file diff --git a/src/json2typescript/any.js.map b/src/json2typescript/any.js.map index 577058a..06ff6bd 100644 --- a/src/json2typescript/any.js.map +++ b/src/json2typescript/any.js.map @@ -1 +1 @@ -{"version":3,"file":"any.js","sourceRoot":"","sources":["any.ts"],"names":[],"mappings":";;AAGA;IAAA;IAAkB,CAAC;IAAD,UAAC;AAAD,CAAC,AAAnB,IAAmB;AAAN,kBAAG"} \ No newline at end of file +{"version":3,"file":"any.js","sourceRoot":"","sources":["../src/json2typescript/any.ts"],"names":[],"mappings":";;AAGA;IAAA;IAAkB,CAAC;IAAD,UAAC;AAAD,CAAC,AAAnB,IAAmB;AAAN,kBAAG"} \ No newline at end of file diff --git a/src/json2typescript/json-convert-decorators.js.map b/src/json2typescript/json-convert-decorators.js.map index df541fa..a23edc5 100644 --- a/src/json2typescript/json-convert-decorators.js.map +++ b/src/json2typescript/json-convert-decorators.js.map @@ -1 +1 @@ -{"version":3,"file":"json-convert-decorators.js","sourceRoot":"","sources":["json-convert-decorators.ts"],"names":[],"mappings":";;AAAA,+DAAkE;AAClE,6BAA4B;AAO5B,uBAA8B,MAAW;IACrC,MAAM,CAAC,+BAAQ,CAAC,eAAe,CAAC,GAAG,EAAE,CAAC;AAC1C,CAAC;AAFD,sCAEC;AAOD,oBA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AC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC;YAC5D,MAAM,CAAC,+BAAQ,CAAC,gBAAgB,CAAC,GAAG,EAAE,CAAC;QAC3C,CAAC;QAED,IAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;QAE1C,EAAE,CAAC,CAAC,OAAM,CAAC,gBAAgB,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC;YAC3C,gBAAgB,GAAG,iBAAiB,CAAC;QACzC,CAAC;QAGD,IAAI,0BAA0B,GAAG,IAAI,qCAAc,EAAE,CAAC;QACtD,0BAA0B,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QACjE,0BAA0B,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QAC/D,0BAA0B,CAAC,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,KAAK,CAAC;QAGxE,EAAE,CAAC,CAAC,OAAM,CAAC,gBAAgB,CAAC,KAAK,WAAW,IAAI,gBAAgB,KAAK,IAAI,IAAI,OAAM,CAAC,gBAAgB,CAAC,+BAAQ,CAAC,eAAe,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC;YAC9I,0BAA0B,CAAC,eAAe,GAAG,IAAI,gBAAgB,EAAE,CAAC;QACxE,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,0BAA0B,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACnE,CAAC;QAGD,MAAM,CAAC,+BAAQ,CAAC,gBAAgB,CAAC,CAAC,SAAS,GAAG,GAAG,GAAG,iBAAiB,CAAC,GAAG,0BAA0B,CAAC;IAExG,CAAC,CAAA;AAEL,CAAC;AA/DD,oCA+DC"} \ No newline at end of file +{"version":3,"file":"json-convert-decorators.js","sourceRoot":"","sources":["../src/json2typescript/json-convert-decorators.ts"],"names":[],"mappings":";;AAAA,+DAAkE;AAClE,6BAA4B;AAO5B,uBAA8B,MAAW;IACrC,MAAM,CAAC,+BAAQ,CAAC,eAAe,CAAC,GAAG,EAAE,C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AC,MAAM,CAAC,+BAAQ,CAAC,gBAAgB,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC;YAC5D,MAAM,CAAC,+BAAQ,CAAC,gBAAgB,CAAC,GAAG,EAAE,CAAC;QAC3C,CAAC;QAED,IAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;QAE1C,EAAE,CAAC,CAAC,OAAM,CAAC,gBAAgB,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC;YAC3C,gBAAgB,GAAG,iBAAiB,CAAC;QACzC,CAAC;QAGD,IAAI,0BAA0B,GAAG,IAAI,qCAAc,EAAE,CAAC;QACtD,0BAA0B,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QACjE,0BAA0B,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QAC/D,0BAA0B,CAAC,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,KAAK,CAAC;QAGxE,EAAE,CAAC,CAAC,OAAM,CAAC,gBAAgB,CAAC,KAAK,WAAW,IAAI,gBAAgB,KAAK,IAAI,IAAI,OAAM,CAAC,gBAAgB,CAAC,+BAAQ,CAAC,eAAe,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC;YAC9I,0BAA0B,CAAC,eAAe,GAAG,IAAI,gBAAgB,EAAE,CAAC;QACxE,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,0BAA0B,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACnE,CAAC;QAGD,MAAM,CAAC,+BAAQ,CAAC,gBAAgB,CAAC,CAAC,SAAS,GAAG,GAAG,GAAG,iBAAiB,CAAC,GAAG,0BAA0B,CAAC;IAExG,CAAC,CAAA;AAEL,CAAC;AA/DD,oCA+DC"} \ No newline at end of file diff --git a/src/json2typescript/json-convert-enums.js b/src/json2typescript/json-convert-enums.js index 627419b..60baa80 100644 --- a/src/json2typescript/json-convert-enums.js +++ b/src/json2typescript/json-convert-enums.js @@ -14,4 +14,4 @@ var ValueCheckingMode; ValueCheckingMode[ValueCheckingMode["DISALLOW_NULL"] = 3] = "DISALLOW_NULL"; })(ValueCheckingMode = exports.ValueCheckingMode || (exports.ValueCheckingMode = {})); ; -//# sourceMappingURL=/Users/andreas/Documents/GIT/appvision@git.appvision.ch/unibasel/json2typescript/src/json2typescript/json-convert-enums.js.map \ No newline at end of file +//# sourceMappingURL=D:/files/work/mc/prime/www/json2typescript/json2typescript/json-convert-enums.js.map \ No newline at end of file diff --git a/src/json2typescript/json-convert-enums.js.map b/src/json2typescript/json-convert-enums.js.map index 557abc9..15f2a20 100644 --- a/src/json2typescript/json-convert-enums.js.map +++ b/src/json2typescript/json-convert-enums.js.map @@ -1 +1 @@ -{"version":3,"file":"json-convert-enums.js","sourceRoot":"","sources":["json-convert-enums.ts"],"names":[],"mappings":";;AAWA,IAAY,aAIX;AAJD,WAAY,aAAa;IACrB,uDAAW,CAAA;IACX,qDAAU,CAAA;IACV,uDAAW,CAAA;AACf,CAAC,EAJW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAIxB;AAAA,CAAC;AAaF,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IACzB,qEAAc,CAAA;IACd,mFAAqB,CAAA;IACrB,2EAAiB,CAAA;AACrB,CAAC,EAJW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAI5B;AAAA,CAAC"} \ No newline at end of file +{"version":3,"file":"json-convert-enums.js","sourceRoot":"","sources":["../src/json2typescript/json-convert-enums.ts"],"names":[],"mappings":";;AAWA,IAAY,aAIX;AAJD,WAAY,aAAa;IACrB,uDAAW,CAAA;IACX,qDAAU,CAAA;IACV,uDAAW,CAAA;AACf,CAAC,EAJW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAIxB;AAAA,CAAC;AAaF,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IACzB,qEAAc,CAAA;IACd,mFAAqB,CAAA;IACrB,2EAAiB,CAAA;AACrB,CAAC,EAJW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAI5B;AAAA,CAAC"} \ No newline at end of file diff --git a/src/json2typescript/json-convert-options.js b/src/json2typescript/json-convert-options.js index 0a0d03e..221bdd2 100644 --- a/src/json2typescript/json-convert-options.js +++ b/src/json2typescript/json-convert-options.js @@ -20,4 +20,4 @@ var MappingOptions = (function () { return MappingOptions; }()); exports.MappingOptions = MappingOptions; -//# sourceMappingURL=/Users/andreas/Documents/GIT/appvision@git.appvision.ch/unibasel/json2typescript/src/json2typescript/json-convert-options.js.map \ No newline at end of file +//# sourceMappingURL=D:/files/work/mc/prime/www/json2typescript/json2typescript/json-convert-options.js.map \ No newline at end of file diff --git a/src/json2typescript/json-convert-options.js.map b/src/json2typescript/json-convert-options.js.map index be226ba..73bd926 100644 --- a/src/json2typescript/json-convert-options.js.map +++ b/src/json2typescript/json-convert-options.js.map @@ -1 +1 @@ -{"version":3,"file":"json-convert-options.js","sourceRoot":"","sources":["json-convert-options.ts"],"names":[],"mappings":";;AAGA;IAAA;IAGA,CAAC;IAAD,eAAC;AAAD,CAAC,AAHD;AACoB,yBAAgB,GAAG,0BAA0B,CAAC;AAC9C,wBAAe,GAAG,yBAAyB,CAAC;AAFnD,4BAAQ;AAGpB,CAAC;AAKF;IAAA;QACI,sBAAiB,GAAW,EAAE,CAAC;QAC/B,qBAAgB,GAAW,EAAE,CAAC;QAC9B,qBAAgB,GAAW,SAAS,CAAC;QACrC,eAAU,GAAY,KAAK,CAAC;QAC5B,oBAAe,GAAQ,IAAI,CAAC;IAChC,CAAC;IAAD,qBAAC;AAAD,CAAC,AAND,IAMC;AANY,wCAAc"} \ No newline at end of file +{"version":3,"file":"json-convert-options.js","sourceRoot":"","sources":["../src/json2typescript/json-convert-options.ts"],"names":[],"mappings":";;AAGA;IAAA;IAGA,CAAC;IAAD,eAAC;AAAD,CAAC,AAHD;AACoB,yBAAgB,GAAG,0BAA0B,CAAC;AAC9C,wBAAe,GAAG,yBAAyB,CAAC;AAFnD,4BAAQ;AAGpB,CAAC;AAKF;IAAA;QACI,sBAAiB,GAAW,EAAE,CAAC;QAC/B,qBAAgB,GAAW,EAAE,CAAC;QAC9B,qBAAgB,GAAY,SAAS,CAAC;QACtC,eAAU,GAAY,KAAK,CAAC;QAC5B,oBAAe,GAAQ,IAAI,CAAC;IAChC,CAAC;IAAD,qBAAC;AAAD,CAAC,AAND,IAMC;AANY,wCAAc"} \ No newline at end of file diff --git a/src/json2typescript/json-convert-options.ts b/src/json2typescript/json-convert-options.ts index e132591..ac073e5 100644 --- a/src/json2typescript/json-convert-options.ts +++ b/src/json2typescript/json-convert-options.ts @@ -12,7 +12,7 @@ export class Settings { export class MappingOptions { classPropertyName: string = ""; jsonPropertyName: string = ""; - expectedJsonType: string = undefined; + expectedJsonType?: string = undefined; isOptional: boolean = false; customConverter: any = null; } \ No newline at end of file diff --git a/src/json2typescript/json-convert.js b/src/json2typescript/json-convert.js index 95413e9..9ec9fc0 100644 --- a/src/json2typescript/json-convert.js +++ b/src/json2typescript/json-convert.js @@ -8,9 +8,9 @@ var JsonConvert = (function () { this._operationMode = json_convert_enums_1.OperationMode.ENABLE; this._valueCheckingMode = json_convert_enums_1.ValueCheckingMode.ALLOW_OBJECT_NULL; this._ignorePrimitiveChecks = false; - if (operationMode in json_convert_enums_1.OperationMode) + if (operationMode != null && operationMode in json_convert_enums_1.OperationMode) this.operationMode = operationMode; - if (valueCheckingMode in json_convert_enums_1.ValueCheckingMode) + if (valueCheckingMode != null && valueCheckingMode in json_convert_enums_1.ValueCheckingMode) this.valueCheckingMode = valueCheckingMode; if (ignorePrimitiveChecks) this.ignorePrimitiveChecks = ignorePrimitiveChecks; @@ -392,4 +392,4 @@ var JsonConvert = (function () { return JsonConvert; }()); exports.JsonConvert = JsonConvert; -//# sourceMappingURL=/Users/andreas/Documents/GIT/appvision@git.appvision.ch/unibasel/json2typescript/src/json2typescript/json-convert.js.map \ No newline at end of file +//# sourceMappingURL=D:/files/work/mc/prime/www/json2typescript/json2typescript/json-convert.js.map \ No newline at end of file diff --git a/src/json2typescript/json-convert.js.map b/src/json2typescript/json-convert.js.map index 0c12084..7652212 100644 --- a/src/json2typescript/json-convert.js.map +++ b/src/json2typescript/json-convert.js.map @@ -1 +1 @@ -{"version":3,"file":"json-convert.js","sourceRoot":"","sources":["json-convert.ts"],"names":[],"mappings":";;AAAA,2DAAwE;AACxE,+DAAkE;AAClE,6BAA4B;AAQ5B;IA0HI,qBAAY,aAAsB,EAAE,iBAA0B,EAAE,qBAA+B;QA3GvF,mBAAc,GAAW,kCAAa,CAAC,MAAM,CAAC;QAoC9C,uBAAkB,GAAW,sCAAiB,CAAC,iBAAiB,CAAC;QAkCjE,2BAAsB,GAAY,KAAK,CAAC;QAsC5C,EAAE,CAAC,CAAC,aAAa,IAAI,kCAAa,CAAC;YAAC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACvE,EAAE,CAAC,CAAC,iBAAiB,IAAI,sCAAiB,CAAC;YAAC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QACvF,EAAE,CAAC,CAAC,qBAAqB,CAAC;YAAC,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;IAClF,CAAC;IApGD,sBAAI,sCAAa;aAAjB;YACI,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC;QAC/B,CAAC;aAWD,UAAkB,KAAa;YAC3B,EAAE,CAAC,CAAC,KAAK,IAAI,kCAAa,CAAC;gBAAC,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QAC5D,CAAC;;;OAbA;IAmCD,sBAAI,0CAAiB;aAArB;YACI,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC;QACnC,CAAC;aAYD,UAAsB,KAAa;YAC/B,EAAE,CAAC,CAAC,KAAK,IAAI,sCAAiB,CAAC;gBAAC,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;QACpE,CAAC;;;OAdA;IA4BD,sBAAI,8CAAqB;aAAzB;YACI,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC;Q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AK,CAAC,CAAC,CAAC;YAC7B,IAAI,GAAG,GAAG,CAAC;YACX,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBACxC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;oBAAC,IAAI,IAAI,GAAG,CAAC;gBACvB,IAAI,IAAI,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3C,CAAC;YACD,IAAI,IAAI,GAAG,CAAC;YACZ,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,OAAM,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC;IAEL,CAAC;IASO,iCAAW,GAAnB,UAAoB,SAAc;QAC9B,MAAM,CAAC,OAAM,CAAC,SAAS,CAAC,CAAC;IAC7B,CAAC;IAEL,kBAAC;AAAD,CAAC,AAxvBD,IAwvBC;AAxvBY,kCAAW"} \ No newline at end of file diff --git a/src/json2typescript/json-convert.ts b/src/json2typescript/json-convert.ts index 0542b61..36dc53c 100644 --- a/src/json2typescript/json-convert.ts +++ b/src/json2typescript/json-convert.ts @@ -131,8 +131,8 @@ export class JsonConvert { * @param ignorePrimitiveChecks optional param (default: false) */ constructor(operationMode?: number, valueCheckingMode?: number, ignorePrimitiveChecks?: boolean) { - if (operationMode in OperationMode) this.operationMode = operationMode; - if (valueCheckingMode in ValueCheckingMode) this.valueCheckingMode = valueCheckingMode; + if (operationMode != null && operationMode in OperationMode) this.operationMode = operationMode; + if (valueCheckingMode != null && valueCheckingMode in ValueCheckingMode) this.valueCheckingMode = valueCheckingMode; if (ignorePrimitiveChecks) this.ignorePrimitiveChecks = ignorePrimitiveChecks; } @@ -398,7 +398,7 @@ export class JsonConvert { private serializeObject_loopProperty(instance: any, classPropertyName: string, json: any): void { // Check if a JSON-object mapping is possible for a property - const mappingOptions: MappingOptions = this.getClassPropertyMappingOptions(instance, classPropertyName); + const mappingOptions: MappingOptions | null = this.getClassPropertyMappingOptions(instance, classPropertyName); if (mappingOptions === null) { return; } @@ -455,7 +455,7 @@ export class JsonConvert { */ private deserializeObject_loopProperty(instance: any, classPropertyName: string, json: any): void { - const mappingOptions: MappingOptions = this.getClassPropertyMappingOptions(instance, classPropertyName); + const mappingOptions: MappingOptions | null = this.getClassPropertyMappingOptions(instance, classPropertyName); if (mappingOptions === null) { return; } @@ -513,7 +513,7 @@ export class JsonConvert { * * @returns {MappingOptions} */ - private getClassPropertyMappingOptions(instance: any, propertyName: string): MappingOptions { + private getClassPropertyMappingOptions(instance: any, propertyName: string): MappingOptions | null { let mappings: any = instance[Settings.MAPPING_PROPERTY]; diff --git a/src/json2typescript/json-custom-convert.js b/src/json2typescript/json-custom-convert.js index 3921066..f9846ee 100644 --- a/src/json2typescript/json-custom-convert.js +++ b/src/json2typescript/json-custom-convert.js @@ -1,3 +1,3 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=/Users/andreas/Documents/GIT/appvision@git.appvision.ch/unibasel/json2typescript/src/json2typescript/json-custom-convert.js.map \ No newline at end of file +//# sourceMappingURL=D:/files/work/mc/prime/www/json2typescript/json2typescript/json-custom-convert.js.map \ No newline at end of file diff --git a/src/json2typescript/json-custom-convert.js.map b/src/json2typescript/json-custom-convert.js.map index a0c3de4..d2543cd 100644 --- a/src/json2typescript/json-custom-convert.js.map +++ b/src/json2typescript/json-custom-convert.js.map @@ -1 +1 @@ -{"version":3,"file":"json-custom-convert.js","sourceRoot":"","sources":["json-custom-convert.ts"],"names":[],"mappings":""} \ No newline at end of file +{"version":3,"file":"json-custom-convert.js","sourceRoot":"","sources":["../src/json2typescript/json-custom-convert.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 330ab45..6393486 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,16 +12,17 @@ "removeComments": true, "target": "es5", "sourceMap": true, - "strictNullChecks": false, + "strictNullChecks": true, "noImplicitAny": true }, "exclude": [ "node_modules", "test", - "**/*.spec.ts" + "**/*.spec.ts", + "**/*.d.ts" ], "files": [ - "index.ts", + "src/index.ts", "src/json2typescript/json-convert", "src/json2typescript/json-convert-decorators.ts", "src/json2typescript/json-convert-enums.ts", From efb611c1ba889bd4967d0790fcf23147446dde8a Mon Sep 17 00:00:00 2001 From: Franklin Davenport Date: Wed, 20 Sep 2017 13:45:15 -0500 Subject: [PATCH 03/11] add declaration files --- src/json2typescript/any.d.ts | 2 ++ .../json-convert-decorators.d.ts | 3 ++ .../json-convert-decorators.js | 2 +- src/json2typescript/json-convert-enums.d.ts | 10 +++++++ src/json2typescript/json-convert-options.d.ts | 11 ++++++++ src/json2typescript/json-convert.d.ts | 28 +++++++++++++++++++ src/json2typescript/json-custom-convert.d.ts | 4 +++ tsconfig.json | 2 +- 8 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 src/json2typescript/any.d.ts create mode 100644 src/json2typescript/json-convert-decorators.d.ts create mode 100644 src/json2typescript/json-convert-enums.d.ts create mode 100644 src/json2typescript/json-convert-options.d.ts create mode 100644 src/json2typescript/json-convert.d.ts create mode 100644 src/json2typescript/json-custom-convert.d.ts diff --git a/src/json2typescript/any.d.ts b/src/json2typescript/any.d.ts new file mode 100644 index 0000000..bbb0b63 --- /dev/null +++ b/src/json2typescript/any.d.ts @@ -0,0 +1,2 @@ +export declare class Any { +} diff --git a/src/json2typescript/json-convert-decorators.d.ts b/src/json2typescript/json-convert-decorators.d.ts new file mode 100644 index 0000000..dac4058 --- /dev/null +++ b/src/json2typescript/json-convert-decorators.d.ts @@ -0,0 +1,3 @@ +export declare function JsonConverter(target: any): void; +export declare function JsonObject(target: any): void; +export declare function JsonProperty(...params: any[]): any; diff --git a/src/json2typescript/json-convert-decorators.js b/src/json2typescript/json-convert-decorators.js index 3518451..b1d7872 100644 --- a/src/json2typescript/json-convert-decorators.js +++ b/src/json2typescript/json-convert-decorators.js @@ -64,4 +64,4 @@ function JsonProperty() { }; } exports.JsonProperty = JsonProperty; -//# sourceMappingURL=/Users/andreas/Documents/GIT/appvision@git.appvision.ch/unibasel/json2typescript/src/json2typescript/json-convert-decorators.js.map \ No newline at end of file +//# sourceMappingURL=D:/files/work/mc/prime/www/json2typescript/json2typescript/json-convert-decorators.js.map \ No newline at end of file diff --git a/src/json2typescript/json-convert-enums.d.ts b/src/json2typescript/json-convert-enums.d.ts new file mode 100644 index 0000000..8b9cb46 --- /dev/null +++ b/src/json2typescript/json-convert-enums.d.ts @@ -0,0 +1,10 @@ +export declare enum OperationMode { + DISABLE = 0, + ENABLE = 1, + LOGGING = 2, +} +export declare enum ValueCheckingMode { + ALLOW_NULL = 1, + ALLOW_OBJECT_NULL = 2, + DISALLOW_NULL = 3, +} diff --git a/src/json2typescript/json-convert-options.d.ts b/src/json2typescript/json-convert-options.d.ts new file mode 100644 index 0000000..0d35962 --- /dev/null +++ b/src/json2typescript/json-convert-options.d.ts @@ -0,0 +1,11 @@ +export declare class Settings { + static readonly MAPPING_PROPERTY: string; + static readonly MAPPER_PROPERTY: string; +} +export declare class MappingOptions { + classPropertyName: string; + jsonPropertyName: string; + expectedJsonType?: string; + isOptional: boolean; + customConverter: any; +} diff --git a/src/json2typescript/json-convert.d.ts b/src/json2typescript/json-convert.d.ts new file mode 100644 index 0000000..1ca3852 --- /dev/null +++ b/src/json2typescript/json-convert.d.ts @@ -0,0 +1,28 @@ +export declare class JsonConvert { + private _operationMode; + operationMode: number; + private _valueCheckingMode; + valueCheckingMode: number; + private _ignorePrimitiveChecks; + ignorePrimitiveChecks: boolean; + constructor(operationMode?: number, valueCheckingMode?: number, ignorePrimitiveChecks?: boolean); + serialize(data: any): any; + serializeObject(instance: any): any; + serializeArray(instanceArray: any[]): any[]; + deserialize(json: any, classReference: { + new (): any; + }): any; + deserializeObject(jsonObject: any, classReference: { + new (): any; + }): any; + deserializeArray(jsonArray: any[], classReference: { + new (): any; + }): any[]; + private serializeObject_loopProperty(instance, classPropertyName, json); + private deserializeObject_loopProperty(instance, classPropertyName, json); + private getClassPropertyMappingOptions(instance, propertyName); + private verifyProperty(expectedJsonType, value, serialize?); + private getExpectedType(expectedJsonType); + private getJsonType(jsonValue); + private getTrueType(trueValue); +} diff --git a/src/json2typescript/json-custom-convert.d.ts b/src/json2typescript/json-custom-convert.d.ts new file mode 100644 index 0000000..733fc1b --- /dev/null +++ b/src/json2typescript/json-custom-convert.d.ts @@ -0,0 +1,4 @@ +export interface JsonCustomConvert { + serialize(data: T): any; + deserialize(data: any): T; +} diff --git a/tsconfig.json b/tsconfig.json index 6393486..ffe5c76 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "declaration": false, + "declaration": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "lib": [ From d529be7cb00f28add77377f3e566b52379f7dcbe Mon Sep 17 00:00:00 2001 From: Franklin Davenport Date: Wed, 20 Sep 2017 13:55:30 -0500 Subject: [PATCH 04/11] package.json: add clean script; fix npm files --- package.json | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index e7626bd..a0c830b 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,9 @@ "scripts": { "test": "karma start karma.conf.js", "build": "npm run test && tsc", - "dist": "npm run build && npm pack" + "build:watch": "tsc -w", + "clean": "rimraf src/**/*.js src/**/*.js.map src/**/*.d.ts", + "dist": "npm run clean && npm run build && npm pack" }, "typescript": { "definition": "dist/index.d.ts" @@ -38,12 +40,13 @@ "karma-phantomjs-launcher": "1.0.4", "karma-typescript": "^3.0.3", "phantomjs-prebuilt": "2.1.14", - "typescript": "2.3.4" + "rimraf": "^2.6.2", + "typescript": "^2.3.4" }, "main": "index.js", "files": [ - "src/json2typescript", - "index.ts", + "src", + "index.d.ts", "index.js" ], "repository": { From cacb40cbd80285e038c58406a2cab704ededfc5c Mon Sep 17 00:00:00 2001 From: Franklin Davenport Date: Wed, 20 Sep 2017 13:55:50 -0500 Subject: [PATCH 05/11] v1.0.6 --- package.json | 4 ++-- src/json2typescript/json-convert-options.js | 4 ++-- src/json2typescript/json-convert-options.js.map | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index a0c830b..4030bce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "json2typescript", - "version": "1.0.5", + "version": "1.0.6", "description": "Provides TypeScript methods to map a JSON object to a JavaScript object on runtime", "keywords": [ "convert", @@ -53,4 +53,4 @@ "type": "git", "url": "https://github.com/dhlab-basel/json2typescript" } -} \ No newline at end of file +} diff --git a/src/json2typescript/json-convert-options.js b/src/json2typescript/json-convert-options.js index 221bdd2..08f9e67 100644 --- a/src/json2typescript/json-convert-options.js +++ b/src/json2typescript/json-convert-options.js @@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true }); var Settings = (function () { function Settings() { } + Settings.MAPPING_PROPERTY = "__jsonconvert__mapping__"; + Settings.MAPPER_PROPERTY = "__jsonconvert__mapper__"; return Settings; }()); -Settings.MAPPING_PROPERTY = "__jsonconvert__mapping__"; -Settings.MAPPER_PROPERTY = "__jsonconvert__mapper__"; exports.Settings = Settings; ; var MappingOptions = (function () { diff --git a/src/json2typescript/json-convert-options.js.map b/src/json2typescript/json-convert-options.js.map index 73bd926..477ea1d 100644 --- a/src/json2typescript/json-convert-options.js.map +++ b/src/json2typescript/json-convert-options.js.map @@ -1 +1 @@ -{"version":3,"file":"json-convert-options.js","sourceRoot":"","sources":["../src/json2typescript/json-convert-options.ts"],"names":[],"mappings":";;AAGA;IAAA;IAGA,CAAC;IAAD,eAAC;AAAD,CAAC,AAHD;AACoB,yBAAgB,GAAG,0BAA0B,CAAC;AAC9C,wBAAe,GAAG,yBAAyB,CAAC;AAFnD,4BAAQ;AAGpB,CAAC;AAKF;IAAA;QACI,sBAAiB,GAAW,EAAE,CAAC;QAC/B,qBAAgB,GAAW,EAAE,CAAC;QAC9B,qBAAgB,GAAY,SAAS,CAAC;QACtC,eAAU,GAAY,KAAK,CAAC;QAC5B,oBAAe,GAAQ,IAAI,CAAC;IAChC,CAAC;IAAD,qBAAC;AAAD,CAAC,AAND,IAMC;AANY,wCAAc"} \ No newline at end of file +{"version":3,"file":"json-convert-options.js","sourceRoot":"","sources":["../src/json2typescript/json-convert-options.ts"],"names":[],"mappings":";;AAGA;IAAA;IAGA,CAAC;IAFmB,yBAAgB,GAAG,0BAA0B,CAAC;IAC9C,wBAAe,GAAG,yBAAyB,CAAC;IAChE,eAAC;CAAA,AAHD,IAGC;AAHY,4BAAQ;AAGpB,CAAC;AAKF;IAAA;QACI,sBAAiB,GAAW,EAAE,CAAC;QAC/B,qBAAgB,GAAW,EAAE,CAAC;QAC9B,qBAAgB,GAAY,SAAS,CAAC;QACtC,eAAU,GAAY,KAAK,CAAC;QAC5B,oBAAe,GAAQ,IAAI,CAAC;IAChC,CAAC;IAAD,qBAAC;AAAD,CAAC,AAND,IAMC;AANY,wCAAc"} \ No newline at end of file From 241f5390338b2ebd6a2255b95dcbd57c8887ea21 Mon Sep 17 00:00:00 2001 From: Franklin Davenport Date: Wed, 20 Sep 2017 14:02:35 -0500 Subject: [PATCH 06/11] fix karma config --- karma.conf.js | 3 +++ tsconfig.json | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/karma.conf.js b/karma.conf.js index c819011..6f96cd5 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -11,6 +11,9 @@ module.exports = function (config) { 'test/**/*.ts', 'src/**/*.ts' ], + exclude: [ + './**/*.d.ts' + ], preprocessors: { 'src/**/*.ts': ['karma-typescript'], 'test/**/*.ts': ['karma-typescript'] diff --git a/tsconfig.json b/tsconfig.json index ffe5c76..bc640e7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,8 +18,7 @@ "exclude": [ "node_modules", "test", - "**/*.spec.ts", - "**/*.d.ts" + "**/*.spec.ts" ], "files": [ "src/index.ts", From 543b94dd2ab3d66f5d8f76f67e2253bd2655ae41 Mon Sep 17 00:00:00 2001 From: Franklin Davenport Date: Wed, 20 Sep 2017 14:13:05 -0500 Subject: [PATCH 07/11] package.json: ignore source ts files --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 4030bce..efe3592 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,9 @@ }, "main": "index.js", "files": [ - "src", + "src/**/*.js", + "src/**/*.js.map", + "src/**/*.d.ts", "index.d.ts", "index.js" ], From 9ad23f8c195cc1d82cd4c34c911213d9abba5c2c Mon Sep 17 00:00:00 2001 From: Franklin Davenport Date: Wed, 20 Sep 2017 15:01:15 -0500 Subject: [PATCH 08/11] Use reflection to store metadata --- package.json | 4 ++- .../json-convert-decorators.js | 12 +++---- .../json-convert-decorators.js.map | 2 +- .../json-convert-decorators.ts | 14 ++++----- src/json2typescript/json-convert-options.d.ts | 16 ++++++++-- src/json2typescript/json-convert-options.js | 31 ++++++++++++++----- .../json-convert-options.js.map | 2 +- src/json2typescript/json-convert-options.ts | 28 ++++++++++++++--- src/json2typescript/json-convert.js | 4 +-- src/json2typescript/json-convert.js.map | 2 +- src/json2typescript/json-convert.ts | 4 +-- 11 files changed, 84 insertions(+), 35 deletions(-) diff --git a/package.json b/package.json index efe3592..c760b14 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,9 @@ "typescript": { "definition": "dist/index.d.ts" }, - "dependencies": {}, + "dependencies": { + "reflect-metadata": "^0.1.10" + }, "devDependencies": { "@types/jasmine": "^2.5.52", "jasmine": "2.6.0", diff --git a/src/json2typescript/json-convert-decorators.js b/src/json2typescript/json-convert-decorators.js index b1d7872..792746a 100644 --- a/src/json2typescript/json-convert-decorators.js +++ b/src/json2typescript/json-convert-decorators.js @@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true }); var json_convert_options_1 = require("./json-convert-options"); var any_1 = require("./any"); function JsonConverter(target) { - target[json_convert_options_1.Settings.MAPPER_PROPERTY] = ""; + json_convert_options_1.Settings.mapper.set("", target); } exports.JsonConverter = JsonConverter; function JsonObject(target) { - target[json_convert_options_1.Settings.MAPPING_PROPERTY] = []; + json_convert_options_1.Settings.mapping.set([], target); } exports.JsonObject = JsonObject; function JsonProperty() { @@ -43,8 +43,8 @@ function JsonProperty() { default: break; } - if (typeof (target[json_convert_options_1.Settings.MAPPING_PROPERTY]) === "undefined") { - target[json_convert_options_1.Settings.MAPPING_PROPERTY] = []; + if (typeof (json_convert_options_1.Settings.mapping.get(target)) === "undefined") { + json_convert_options_1.Settings.mapping.set([], target); } var className = target.constructor.name; if (typeof (jsonPropertyName) === "undefined") { @@ -54,13 +54,13 @@ function JsonProperty() { jsonPropertyMappingOptions.classPropertyName = classPropertyName; jsonPropertyMappingOptions.jsonPropertyName = jsonPropertyName; jsonPropertyMappingOptions.isOptional = isOptional ? isOptional : false; - if (typeof (conversionOption) !== "undefined" && conversionOption !== null && typeof (conversionOption[json_convert_options_1.Settings.MAPPER_PROPERTY]) !== "undefined") { + if (typeof (conversionOption) !== "undefined" && conversionOption !== null && typeof (json_convert_options_1.Settings.mapper.get(conversionOption)) !== "undefined") { jsonPropertyMappingOptions.customConverter = new conversionOption(); } else { jsonPropertyMappingOptions.expectedJsonType = conversionOption; } - target[json_convert_options_1.Settings.MAPPING_PROPERTY][className + "." + classPropertyName] = jsonPropertyMappingOptions; + json_convert_options_1.Settings.mapping.get(target)[className + "." + classPropertyName] = jsonPropertyMappingOptions; }; } exports.JsonProperty = JsonProperty; diff --git a/src/json2typescript/json-convert-decorators.js.map b/src/json2typescript/json-convert-decorators.js.map index a23edc5..a549424 100644 --- a/src/json2typescript/json-convert-decorators.js.map +++ b/src/json2typescript/json-convert-decorators.js.map @@ -1 +1 @@ -{"version":3,"file":"json-convert-decorators.js","sourceRoot":"","sources":["../src/json2typescript/json-convert-decorators.ts"],"names":[],"mappings":";;AAAA,+DAAkE;AAClE,6BAA4B;AAO5B,uB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AC;YACV;gBACI,KAAK,CAAC;QACd,CAAC;QAGD,EAAE,CAAC,CAAC,OAAM,CAAC,MAAM,CAAC,+BAAQ,CAAC,gBAAgB,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC;YAC5D,MAAM,CAAC,+BAAQ,CAAC,gBAAgB,CAAC,GAAG,EAAE,CAAC;QAC3C,CAAC;QAED,IAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;QAE1C,EAAE,CAAC,CAAC,OAAM,CAAC,gBAAgB,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC;YAC3C,gBAAgB,GAAG,iBAAiB,CAAC;QACzC,CAAC;QAGD,IAAI,0BAA0B,GAAG,IAAI,qCAAc,EAAE,CAAC;QACtD,0BAA0B,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QACjE,0BAA0B,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QAC/D,0BAA0B,CAAC,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,KAAK,CAAC;QAGxE,EAAE,CAAC,CAAC,OAAM,CAAC,gBAAgB,CAAC,KAAK,WAAW,IAAI,gBAAgB,KAAK,IAAI,IAAI,OAAM,CAAC,gBAAgB,CAAC,+BAAQ,CAAC,eAAe,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC;YAC9I,0BAA0B,CAAC,eAAe,GAAG,IAAI,gBAAgB,EAAE,CAAC;QACxE,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,0BAA0B,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACnE,CAAC;QAGD,MAAM,CAAC,+BAAQ,CAAC,gBAAgB,CAAC,CAAC,SAAS,GAAG,GAAG,GAAG,iBAAiB,CAAC,GAAG,0BAA0B,CAAC;IAExG,CAAC,CAAA;AAEL,CAAC;AA/DD,oCA+DC"} \ No newline at end of file +{"version":3,"file":"json-convert-decorators.js","sourceRoot":"","sources":["../src/json2typescript/json-convert-decorators.ts"],"names":[],"mappings":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A+DC"} \ No newline at end of file diff --git a/src/json2typescript/json-convert-decorators.ts b/src/json2typescript/json-convert-decorators.ts index 318afa4..0bb8bdc 100644 --- a/src/json2typescript/json-convert-decorators.ts +++ b/src/json2typescript/json-convert-decorators.ts @@ -7,7 +7,7 @@ import { Any } from "./any"; * @param target the class */ export function JsonConverter(target: any) { - target[Settings.MAPPER_PROPERTY] = ""; + Settings.mapper.set("", target); } /** @@ -16,7 +16,7 @@ export function JsonConverter(target: any) { * @param target the class */ export function JsonObject(target: any) { - target[Settings.MAPPING_PROPERTY] = []; + Settings.mapping.set([], target); } /** @@ -71,9 +71,9 @@ export function JsonProperty(...params: any[]): any { break; } - - if (typeof(target[Settings.MAPPING_PROPERTY]) === "undefined") { - target[Settings.MAPPING_PROPERTY] = []; + + if (typeof(Settings.mapping.get(target)) === "undefined") { + Settings.mapping.set([], target) } const className = target.constructor.name; @@ -89,14 +89,14 @@ export function JsonProperty(...params: any[]): any { jsonPropertyMappingOptions.isOptional = isOptional ? isOptional : false; // Check if conversionOption is a type or a custom converter. - if (typeof(conversionOption) !== "undefined" && conversionOption !== null && typeof(conversionOption[Settings.MAPPER_PROPERTY]) !== "undefined") { + if (typeof(conversionOption) !== "undefined" && conversionOption !== null && typeof(Settings.mapper.get(conversionOption)) !== "undefined") { jsonPropertyMappingOptions.customConverter = new conversionOption(); } else { jsonPropertyMappingOptions.expectedJsonType = conversionOption; } // Save the mapping info - target[Settings.MAPPING_PROPERTY][className + "." + classPropertyName] = jsonPropertyMappingOptions; + Settings.mapping.get(target)[className + "." + classPropertyName] = jsonPropertyMappingOptions; } diff --git a/src/json2typescript/json-convert-options.d.ts b/src/json2typescript/json-convert-options.d.ts index 0d35962..1299d80 100644 --- a/src/json2typescript/json-convert-options.d.ts +++ b/src/json2typescript/json-convert-options.d.ts @@ -1,6 +1,16 @@ -export declare class Settings { - static readonly MAPPING_PROPERTY: string; - static readonly MAPPER_PROPERTY: string; +import "reflect-metadata"; +export declare class MetadataTool { + metadataKey: string; + constructor(metadataKey: string); + get(target: any): any; + getOwn(target: any): any; + hasOwn(target: any): boolean; + set(value: T, target: any): void; +} +export declare namespace Settings { + const mapping: MetadataTool; + const mapper: MetadataTool; + const propertyClass: MetadataTool; } export declare class MappingOptions { classPropertyName: string; diff --git a/src/json2typescript/json-convert-options.js b/src/json2typescript/json-convert-options.js index 08f9e67..80c8f21 100644 --- a/src/json2typescript/json-convert-options.js +++ b/src/json2typescript/json-convert-options.js @@ -1,14 +1,31 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var Settings = (function () { - function Settings() { +require("reflect-metadata"); +var MetadataTool = (function () { + function MetadataTool(metadataKey) { + this.metadataKey = metadataKey; } - Settings.MAPPING_PROPERTY = "__jsonconvert__mapping__"; - Settings.MAPPER_PROPERTY = "__jsonconvert__mapper__"; - return Settings; + MetadataTool.prototype.get = function (target) { + return Reflect.getMetadata(this.metadataKey, target); + }; + MetadataTool.prototype.getOwn = function (target) { + return Reflect.getOwnMetadata(this.metadataKey, target); + }; + MetadataTool.prototype.hasOwn = function (target) { + return Reflect.hasOwnMetadata(this.metadataKey, target); + }; + MetadataTool.prototype.set = function (value, target) { + return Reflect.defineMetadata(this.metadataKey, value, target); + }; + return MetadataTool; }()); -exports.Settings = Settings; -; +exports.MetadataTool = MetadataTool; +var Settings; +(function (Settings) { + Settings.mapping = new MetadataTool("__jsonconvert__mapping__"); + Settings.mapper = new MetadataTool("__jsonconvert__mapper__"); + Settings.propertyClass = new MetadataTool("__jsonconvert__property_class__"); +})(Settings = exports.Settings || (exports.Settings = {})); var MappingOptions = (function () { function MappingOptions() { this.classPropertyName = ""; diff --git a/src/json2typescript/json-convert-options.js.map b/src/json2typescript/json-convert-options.js.map index 477ea1d..66f53c7 100644 --- a/src/json2typescript/json-convert-options.js.map +++ b/src/json2typescript/json-convert-options.js.map @@ -1 +1 @@ -{"version":3,"file":"json-convert-options.js","sourceRoot":"","sources":["../src/json2typescript/json-convert-options.ts"],"names":[],"mappings":";;AAGA;IAAA;IAGA,CAAC;IAFmB,yBAAgB,GAAG,0BAA0B,CAAC;IAC9C,wBAAe,GAAG,yBAAyB,CAAC;IAChE,eAAC;CAAA,AAHD,IAGC;AAHY,4BAAQ;AAGpB,CAAC;AAKF;IAAA;QACI,sBAAiB,GAAW,EAAE,CAAC;QAC/B,qBAAgB,GAAW,EAAE,CAAC;QAC9B,qBAAgB,GAAY,SAAS,CAAC;QACtC,eAAU,GAAY,KAAK,CAAC;QAC5B,oBAAe,GAAQ,IAAI,CAAC;IAChC,CAAC;IAAD,qBAAC;AAAD,CAAC,AAND,IAMC;AANY,wCAAc"} \ No newline at end of file +{"version":3,"file":"json-convert-options.js","sourceRoot":"","sources":["../src/json2typescript/json-convert-options.ts"],"names":[],"mappings":";;AAAA,4BAA0B;AAE1B;IACI,sBAAmB,WAAmB;QAAnB,gBAAW,GAAX,WAAW,CAAQ;IACtC,CAAC;IACD,0BAAG,GAAH,UAAI,MAAW;QACX,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACzD,CAAC;IACD,6BAAM,GAAN,UAAO,MAAW;QACd,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAC5D,CAAC;IACD,6BAAM,GAAN,UAAO,MAAW;QACd,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAC5D,CAAC;IACD,0BAAG,GAAH,UAAI,KAAQ,EAAE,MAAW;QACrB,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IACnE,CAAC;IACL,mBAAC;AAAD,CAAC,AAfD,IAeC;AAfY,oCAAY;AAoBzB,IAAiB,QAAQ,CAIxB;AAJD,WAAiB,QAAQ;IACR,gBAAO,GAAG,IAAI,YAAY,CAAM,0BAA0B,CAAC,CAAC;IAC5D,eAAM,GAAG,IAAI,YAAY,CAAM,yBAAyB,CAAC,CAAC;IAC1D,sBAAa,GAAG,IAAI,YAAY,CAAM,iCAAiC,CAAC,CAAC;AAC1F,CAAC,EAJgB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAIxB;AAKD;IAAA;QACI,sBAAiB,GAAW,EAAE,CAAC;QAC/B,qBAAgB,GAAW,EAAE,CAAC;QAC9B,qBAAgB,GAAY,SAAS,CAAC;QACtC,eAAU,GAAY,KAAK,CAAC;QAC5B,oBAAe,GAAQ,IAAI,CAAC;IAChC,CAAC;IAAD,qBAAC;AAAD,CAAC,AAND,IAMC;AANY,wCAAc"} \ No newline at end of file diff --git a/src/json2typescript/json-convert-options.ts b/src/json2typescript/json-convert-options.ts index ac073e5..4b63ab3 100644 --- a/src/json2typescript/json-convert-options.ts +++ b/src/json2typescript/json-convert-options.ts @@ -1,10 +1,30 @@ +import "reflect-metadata"; + +export class MetadataTool { + constructor(public metadataKey: string) { + } + get(target: any) { + return Reflect.getMetadata(this.metadataKey, target); + } + getOwn(target: any) { + return Reflect.getOwnMetadata(this.metadataKey, target); + } + hasOwn(target: any) { + return Reflect.hasOwnMetadata(this.metadataKey, target); + } + set(value: T, target: any) { + return Reflect.defineMetadata(this.metadataKey, value, target); + } +} + /** * Internal constants. */ -export class Settings { - static readonly MAPPING_PROPERTY = "__jsonconvert__mapping__"; - static readonly MAPPER_PROPERTY = "__jsonconvert__mapper__"; -}; +export namespace Settings { + export const mapping = new MetadataTool("__jsonconvert__mapping__"); + export const mapper = new MetadataTool("__jsonconvert__mapper__"); + export const propertyClass = new MetadataTool("__jsonconvert__property_class__"); +} /** * Internal mapping options for a property. diff --git a/src/json2typescript/json-convert.js b/src/json2typescript/json-convert.js index 9ec9fc0..9a777d8 100644 --- a/src/json2typescript/json-convert.js +++ b/src/json2typescript/json-convert.js @@ -229,7 +229,7 @@ var JsonConvert = (function () { } }; JsonConvert.prototype.getClassPropertyMappingOptions = function (instance, propertyName) { - var mappings = instance[json_convert_options_1.Settings.MAPPING_PROPERTY]; + var mappings = json_convert_options_1.Settings.mapping.get(instance); if (typeof (mappings) === "undefined") return null; var directMappingName = instance.constructor.name + "." + propertyName; @@ -247,7 +247,7 @@ var JsonConvert = (function () { return value; } if (expectedJsonType instanceof Array === false && value instanceof Array === false) { - if (typeof (expectedJsonType) !== "undefined" && expectedJsonType.hasOwnProperty(json_convert_options_1.Settings.MAPPING_PROPERTY)) { + if (typeof (expectedJsonType) !== "undefined" && json_convert_options_1.Settings.mapping.hasOwn(expectedJsonType)) { if (value === null) { if (this.valueCheckingMode !== json_convert_enums_1.ValueCheckingMode.DISALLOW_NULL) return null; diff --git a/src/json2typescript/json-convert.js.map b/src/json2typescript/json-convert.js.map index 7652212..d3d7028 100644 --- a/src/json2typescript/json-convert.js.map +++ b/src/json2typescript/json-convert.js.map @@ -1 +1 @@ -{"version":3,"file":"json-convert.js","sourceRoot":"","sources":["../src/json2typescript/json-convert.ts"],"names":[],"mappings":";;AAAA,2DAAwE;AACxE,+DAAkE;AAClE,6BAA4B;AAQ5B;IA0HI,qBAAY,aAAsB,EAAE,iBAA0B,EAAE,qBAA+B;QA3GvF,mBAAc,GAAW,kCAAa,CAAC,MAAM,CAAC;QAoC9C,uBAAkB,GAAW,sCAAiB,CAAC,iBAAiB,CAAC;QAkCjE,2BAAsB,GAAY,KAAK,CAAC;QAsC5C,EAAE,CAAC,CAAC,aAAa,IAAI,IAAI,IAAI,aAAa,IAAI,kCAAa,CAAC;YAAC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QAChG,EAAE,CAAC,CAAC,iBAAiB,IAAI,IAAI,IAAI,iBAAiB,IAAI,sCAAiB,CAAC;YAAC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QACpH,EAAE,CAAC,CAAC,qBAAqB,CAAC;YAAC,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;IAClF,CAAC;IApGD,s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ts index 36dc53c..5465ac8 100644 --- a/src/json2typescript/json-convert.ts +++ b/src/json2typescript/json-convert.ts @@ -515,7 +515,7 @@ export class JsonConvert { */ private getClassPropertyMappingOptions(instance: any, propertyName: string): MappingOptions | null { - let mappings: any = instance[Settings.MAPPING_PROPERTY]; + let mappings: any = Settings.mapping.get(instance); // Check if mapping is defined if (typeof(mappings) === "undefined") return null; @@ -559,7 +559,7 @@ export class JsonConvert { if (expectedJsonType instanceof Array === false && value instanceof Array === false) { // Check the type - if (typeof(expectedJsonType) !== "undefined" && expectedJsonType.hasOwnProperty(Settings.MAPPING_PROPERTY)) { // only decorated custom objects have this injected property + if (typeof(expectedJsonType) !== "undefined" && Settings.mapping.hasOwn(expectedJsonType)) { // only decorated custom objects have this injected property // Check if we have null value if (value === null) { From b5d44c068aa94b91fb2c9b76975580f1f674685b Mon Sep 17 00:00:00 2001 From: Franklin Davenport Date: Wed, 20 Sep 2017 17:53:46 -0500 Subject: [PATCH 09/11] fix inherited decorators --- package.json | 4 +- .../json-convert-decorators.js | 75 ++++-- .../json-convert-decorators.js.map | 2 +- .../json-convert-decorators.ts | 79 +++--- src/json2typescript/json-convert-options.d.ts | 9 +- src/json2typescript/json-convert-options.js | 35 ++- .../json-convert-options.js.map | 2 +- src/json2typescript/json-convert-options.ts | 43 ++- src/json2typescript/json-convert.js | 7 +- src/json2typescript/json-convert.js.map | 2 +- src/json2typescript/json-convert.ts | 5 +- test/json2typescript.integration.js | 188 ------------- test/json2typescript.integration.ts | 19 +- test/json2typescript.unit.js | 249 ------------------ test/json2typescript.unit.ts | 102 +++---- tsconfig.json | 9 +- 16 files changed, 255 insertions(+), 575 deletions(-) delete mode 100644 test/json2typescript.integration.js delete mode 100644 test/json2typescript.unit.js diff --git a/package.json b/package.json index c760b14..ad89255 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "test": "karma start karma.conf.js", "build": "npm run test && tsc", "build:watch": "tsc -w", - "clean": "rimraf src/**/*.js src/**/*.js.map src/**/*.d.ts", + "clean": "rimraf src/**/*.js src/**/*.js.map src/**/*.d.ts test/**/*.js test/**/*.js.map test/**/*.d.ts", "dist": "npm run clean && npm run build && npm pack" }, "typescript": { @@ -43,7 +43,7 @@ "karma-typescript": "^3.0.3", "phantomjs-prebuilt": "2.1.14", "rimraf": "^2.6.2", - "typescript": "^2.3.4" + "typescript": "^2.5.2" }, "main": "index.js", "files": [ diff --git a/src/json2typescript/json-convert-decorators.js b/src/json2typescript/json-convert-decorators.js index 792746a..cd64419 100644 --- a/src/json2typescript/json-convert-decorators.js +++ b/src/json2typescript/json-convert-decorators.js @@ -1,4 +1,12 @@ "use strict"; +var __assign = (this && this.__assign) || Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; +}; Object.defineProperty(exports, "__esModule", { value: true }); var json_convert_options_1 = require("./json-convert-options"); var any_1 = require("./any"); @@ -15,36 +23,43 @@ function JsonProperty() { for (var _i = 0; _i < arguments.length; _i++) { params[_i] = arguments[_i]; } - return function (target, classPropertyName) { - var jsonPropertyName = classPropertyName; - var conversionOption = any_1.Any; - var isOptional = false; - switch (params.length) { - case 0: - break; - case 1: - jsonPropertyName = params[0]; - break; - case 2: - if (params[1] === undefined) - throw new Error("Fatal error in JsonConvert. " + - "It's not allowed to explicitely pass \"undefined\" as second parameter in the @JsonProperty decorator.\n\n" + - "\tClass name: \n\t\t" + target.constructor.name + "\n\n" + - "\tClass property: \n\t\t" + classPropertyName + "\n\n" + - "Use \"Any\" to allow any type. You can import this class from \"json2typescript\".\n\n"); - jsonPropertyName = params[0]; - conversionOption = params[1]; - break; - case 3: - jsonPropertyName = params[0]; - conversionOption = params[1]; - isOptional = params[2]; - break; - default: + var overrideJsonPropertyName = null; + var conversionOption = any_1.Any; + var isOptional = false; + var isError = false; + switch (params.length) { + case 0: + break; + case 1: + overrideJsonPropertyName = params[0]; + break; + case 2: + if (params[1] === undefined) { + isError = true; break; + } + overrideJsonPropertyName = params[0]; + conversionOption = params[1]; + break; + case 3: + overrideJsonPropertyName = params[0]; + conversionOption = params[1]; + isOptional = params[2]; + break; + default: + break; + } + return function (target, classPropertyName, descriptor) { + if (isError) { + throw new Error("Fatal error in JsonConvert. " + + "It's not allowed to explicitely pass \"undefined\" as second parameter in the @JsonProperty decorator.\n\n" + + "\tClass name: \n\t\t" + target.constructor.name + "\n\n" + + "\tClass property: \n\t\t" + classPropertyName + "\n\n" + + "Use \"Any\" to allow any type. You can import this class from \"json2typescript\".\n\n"); } - if (typeof (json_convert_options_1.Settings.mapping.get(target)) === "undefined") { - json_convert_options_1.Settings.mapping.set([], target); + var jsonPropertyName = classPropertyName; + if (overrideJsonPropertyName != null) { + jsonPropertyName = overrideJsonPropertyName; } var className = target.constructor.name; if (typeof (jsonPropertyName) === "undefined") { @@ -60,7 +75,9 @@ function JsonProperty() { else { jsonPropertyMappingOptions.expectedJsonType = conversionOption; } - json_convert_options_1.Settings.mapping.get(target)[className + "." + classPropertyName] = jsonPropertyMappingOptions; + var mapping = json_convert_options_1.Settings.mapping.getOwnOrInitFromAncestors(target, function (a) { return (__assign({}, a)); }); + mapping[className + "." + classPropertyName] = jsonPropertyMappingOptions; + json_convert_options_1.Settings.classProperties.getOwnOrInitFromAncestors(target, function (a) { return (a || []).slice(); }).push(classPropertyName); }; } exports.JsonProperty = JsonProperty; diff --git a/src/json2typescript/json-convert-decorators.js.map b/src/json2typescript/json-convert-decorators.js.map index a549424..c87be03 100644 --- a/src/json2typescript/json-convert-decorators.js.map +++ b/src/json2typescript/json-convert-decorators.js.map @@ -1 +1 @@ -{"version":3,"file":"json-convert-decorators.js","sourceRoot":"","sources":["../src/json2typescript/json-convert-decorators.ts"],"names":[],"mappings":";;AAAA,+DAAkE;AAClE,6BAA4B;AAO5B,uBAA8B,MAAW;IACrC,+BAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CA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AC,OAAM,CAAC,+BAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC;YACvD,+BAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;QACpC,CAAC;QAED,IAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;QAE1C,EAAE,CAAC,CAAC,OAAM,CAAC,gBAAgB,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC;YAC3C,gBAAgB,GAAG,iBAAiB,CAAC;QACzC,CAAC;QAGD,IAAI,0BAA0B,GAAG,IAAI,qCAAc,EAAE,CAAC;QACtD,0BAA0B,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QACjE,0BAA0B,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QAC/D,0BAA0B,CAAC,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,KAAK,CAAC;QAGxE,EAAE,CAAC,CAAC,OAAM,CAAC,gBAAgB,CAAC,KAAK,WAAW,IAAI,gBAAgB,KAAK,IAAI,IAAI,OAAM,CAAC,+BAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC;YACzI,0BAA0B,CAAC,eAAe,GAAG,IAAI,gBAAgB,EAAE,CAAC;QACxE,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,0BAA0B,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACnE,CAAC;QAGD,+BAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,SAAS,GAAG,GAAG,GAAG,iBAAiB,CAAC,GAAG,0BAA0B,CAAC;IAEnG,CAAC,CAAA;AAEL,CAAC;AA/DD,oCA+DC"} \ No newline at end of file +{"version":3,"file":"json-convert-decorators.js","sourceRoot":"","sources":["../src/json2typescript/json-convert-decorators.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,+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AE,UAAC,CAAC,IAAK,OAAA,cAAM,CAAC,EAAG,EAAV,CAAU,CAAC,CAAC;QACtF,OAAO,CAAC,SAAS,GAAG,GAAG,GAAG,iBAAiB,CAAC,GAAG,0BAA0B,CAAC;QAG1E,+BAAQ,CAAC,eAAe,CAAC,yBAAyB,CAAC,MAAM,EAAE,UAAC,CAAC,IAAK,OAAI,CAAC,CAAC,IAAI,EAAE,CAAC,UAAb,CAAc,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAG9G,CAAC,CAAA;AAEL,CAAC;AA5ED,oCA4EC"} \ No newline at end of file diff --git a/src/json2typescript/json-convert-decorators.ts b/src/json2typescript/json-convert-decorators.ts index 0bb8bdc..e5b673d 100644 --- a/src/json2typescript/json-convert-decorators.ts +++ b/src/json2typescript/json-convert-decorators.ts @@ -38,42 +38,50 @@ export function JsonObject(target: any) { * @returns {(target:any, key:string)=>void} */ export function JsonProperty(...params: any[]): any { + + let overrideJsonPropertyName: string | null = null; + let conversionOption: any = Any; + let isOptional: boolean = false; + let isError = false; - return function (target: any, classPropertyName: string): void { + switch (params.length) { + case 0: + break; + case 1: + overrideJsonPropertyName = params[0]; + break; + case 2: + if (params[1] === undefined) { + isError = true; + break; + } + overrideJsonPropertyName = params[0]; + conversionOption = params[1]; + break; + case 3: + overrideJsonPropertyName = params[0]; + conversionOption = params[1]; + isOptional = params[2]; + break; + default: + break; + } - let jsonPropertyName: string = classPropertyName; - let conversionOption: any = Any; - let isOptional: boolean = false; + return function (target: any, classPropertyName: string, descriptor: PropertyDescriptor): void { - switch (params.length) { - case 0: - break; - case 1: - jsonPropertyName = params[0]; - break; - case 2: - if (params[1] === undefined) throw new Error( - "Fatal error in JsonConvert. " + - "It's not allowed to explicitely pass \"undefined\" as second parameter in the @JsonProperty decorator.\n\n" + - "\tClass name: \n\t\t" + target.constructor.name + "\n\n" + - "\tClass property: \n\t\t" + classPropertyName + "\n\n" + - "Use \"Any\" to allow any type. You can import this class from \"json2typescript\".\n\n" - ); - jsonPropertyName = params[0]; - conversionOption = params[1]; - break; - case 3: - jsonPropertyName = params[0]; - conversionOption = params[1]; - isOptional = params[2]; - break; - default: - break; + if (isError) { + throw new Error( + "Fatal error in JsonConvert. " + + "It's not allowed to explicitely pass \"undefined\" as second parameter in the @JsonProperty decorator.\n\n" + + "\tClass name: \n\t\t" + target.constructor.name + "\n\n" + + "\tClass property: \n\t\t" + classPropertyName + "\n\n" + + "Use \"Any\" to allow any type. You can import this class from \"json2typescript\".\n\n" + ); } - - if (typeof(Settings.mapping.get(target)) === "undefined") { - Settings.mapping.set([], target) + let jsonPropertyName: string = classPropertyName; + if (overrideJsonPropertyName != null) { + jsonPropertyName = overrideJsonPropertyName } const className = target.constructor.name; @@ -96,8 +104,13 @@ export function JsonProperty(...params: any[]): any { } // Save the mapping info - Settings.mapping.get(target)[className + "." + classPropertyName] = jsonPropertyMappingOptions; - + const mapping = Settings.mapping.getOwnOrInitFromAncestors(target, (a) => ({ ...a })); + mapping[className + "." + classPropertyName] = jsonPropertyMappingOptions; + + // Save that key + Settings.classProperties.getOwnOrInitFromAncestors(target, (a) => [...(a || [])]).push(classPropertyName); + // console.log("Mapping Info", (target as any).constructor.name, Settings.mapping.get(target)); + // console.log("class properties", (target as any).constructor.name, Settings.classProperties.get(target)); } } \ No newline at end of file diff --git a/src/json2typescript/json-convert-options.d.ts b/src/json2typescript/json-convert-options.d.ts index 1299d80..8102f81 100644 --- a/src/json2typescript/json-convert-options.d.ts +++ b/src/json2typescript/json-convert-options.d.ts @@ -2,8 +2,12 @@ import "reflect-metadata"; export declare class MetadataTool { metadataKey: string; constructor(metadataKey: string); - get(target: any): any; - getOwn(target: any): any; + get(target: any): T | undefined; + getOrFail(target: any): T; + getOrInit(target: any, defaultValue: () => T): T; + getOwnOrInit(target: any, defaultValue: () => T): T; + getOwnOrInitFromAncestors(target: any, defaultValue: (firstAncestorValue: T | undefined | null) => T): T; + getOwn(target: any): T | undefined; hasOwn(target: any): boolean; set(value: T, target: any): void; } @@ -11,6 +15,7 @@ export declare namespace Settings { const mapping: MetadataTool; const mapper: MetadataTool; const propertyClass: MetadataTool; + const classProperties: MetadataTool; } export declare class MappingOptions { classPropertyName: string; diff --git a/src/json2typescript/json-convert-options.js b/src/json2typescript/json-convert-options.js index 80c8f21..7ae7ccd 100644 --- a/src/json2typescript/json-convert-options.js +++ b/src/json2typescript/json-convert-options.js @@ -8,6 +8,38 @@ var MetadataTool = (function () { MetadataTool.prototype.get = function (target) { return Reflect.getMetadata(this.metadataKey, target); }; + MetadataTool.prototype.getOrFail = function (target) { + var result = this.get(target); + if (result == null) { + throw new Error("MetadataTool.getOrFail: no data found for key (" + this.metadataKey + ")"); + } + return result; + }; + MetadataTool.prototype.getOrInit = function (target, defaultValue) { + var result = this.get(target); + if (result == null) { + result = defaultValue(); + this.set(result, target); + } + return result; + }; + MetadataTool.prototype.getOwnOrInit = function (target, defaultValue) { + var result = this.getOwn(target); + if (result == null) { + result = defaultValue(); + this.set(result, target); + } + return result; + }; + MetadataTool.prototype.getOwnOrInitFromAncestors = function (target, defaultValue) { + var result = this.getOwn(target); + if (result == null) { + var ancestorValue = this.get(target); + result = defaultValue(ancestorValue); + this.set(result, target); + } + return result; + }; MetadataTool.prototype.getOwn = function (target) { return Reflect.getOwnMetadata(this.metadataKey, target); }; @@ -15,7 +47,7 @@ var MetadataTool = (function () { return Reflect.hasOwnMetadata(this.metadataKey, target); }; MetadataTool.prototype.set = function (value, target) { - return Reflect.defineMetadata(this.metadataKey, value, target); + Reflect.defineMetadata(this.metadataKey, value, target); }; return MetadataTool; }()); @@ -25,6 +57,7 @@ var Settings; Settings.mapping = new MetadataTool("__jsonconvert__mapping__"); Settings.mapper = new MetadataTool("__jsonconvert__mapper__"); Settings.propertyClass = new MetadataTool("__jsonconvert__property_class__"); + Settings.classProperties = new MetadataTool("__jsonconvert__class_properties__"); })(Settings = exports.Settings || (exports.Settings = {})); var MappingOptions = (function () { function MappingOptions() { diff --git a/src/json2typescript/json-convert-options.js.map b/src/json2typescript/json-convert-options.js.map index 66f53c7..48b9520 100644 --- a/src/json2typescript/json-convert-options.js.map +++ b/src/json2typescript/json-convert-options.js.map @@ -1 +1 @@ -{"version":3,"file":"json-convert-options.js","sourceRoot":"","sources":["../src/json2typescript/json-convert-options.ts"],"names":[],"mappings":";;AAAA,4BAA0B;AAE1B;IACI,sBAAmB,WAAmB;QAAnB,gBAAW,GAAX,WAAW,CAAQ;IACtC,CAAC;IACD,0BAAG,GAAH,UAAI,MAAW;QACX,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACzD,CAAC;IACD,6BAAM,GAAN,UAAO,MAAW;QACd,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAC5D,CAAC;IACD,6BAAM,GAAN,UAAO,MAAW;QACd,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAC5D,CAAC;IACD,0BAAG,GAAH,UAAI,KAAQ,EAAE,MAAW;QACrB,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IACnE,CAAC;IACL,mBAAC;AAAD,CAAC,AAfD,IAeC;AAfY,oCAAY;AAoBzB,IAAiB,QAAQ,CAIxB;AAJD,WAAiB,QAAQ;IACR,gBAAO,GAAG,IAAI,YAAY,CAAM,0BAA0B,CAAC,CAAC;IAC5D,eAAM,GAAG,IAAI,YAAY,CAAM,yBAAyB,CAAC,CAAC;IAC1D,sBAAa,GAAG,IAAI,YAAY,CAAM,iCAAiC,CAAC,CAAC;AAC1F,CAAC,EAJgB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAIxB;AAKD;IAAA;QACI,sBAAiB,GAAW,EAAE,CAAC;QAC/B,qBAAgB,GAAW,EAAE,CAAC;QAC9B,qBAAgB,GAAY,SAAS,CAAC;QACtC,eAAU,GAAY,KAAK,CAAC;QAC5B,oBAAe,GAAQ,IAAI,CAAC;IAChC,CAAC;IAAD,qBAAC;AAAD,CAAC,AAND,IAMC;AANY,wCAAc"} \ No newline at end of file +{"version":3,"file":"json-convert-options.js","sourceRoot":"","sources":["../src/json2typescript/json-convert-options.ts"],"names":[],"mappings":";;AAAA,4BAA0B;AAE1B;IACI,sBAAmB,WAAmB;QAAnB,gBAAW,GAAX,WAAW,CAAQ;IACtC,CAAC;IACD,0BAAG,GAAH,UAAI,MAAW;QACX,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACzD,CAAC;IACD,gCAAS,GAAT,UAAU,MAAW;QACjB,IAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAChC,EAAE,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,iDAAiD,GAAG,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC,CAAC;QAChG,CAAC;QACD,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IACD,gCAAS,GAAT,UAAU,MAAW,EAAE,YAAqB;QACxC,IAAI,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC9B,EAAE,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC;YACjB,MAAM,GAAG,YAAY,EAAE,CAAC;YACxB,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC7B,CAAC;QACD,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IACD,mCAAY,GAAZ,UAAa,MAAW,EAAE,YAAqB;QAC3C,IAAI,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACjC,EAAE,CAAC,CAAC,MAAM,IAAI,I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CAAC,CAAC;IACzE,wBAAe,GAAG,IAAI,YAAY,CAAW,mCAAmC,CAAC,CAAC;AACnG,CAAC,EALgB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAKxB;AAKD;IAAA;QACI,sBAAiB,GAAW,EAAE,CAAC;QAC/B,qBAAgB,GAAW,EAAE,CAAC;QAC9B,qBAAgB,GAAY,SAAS,CAAC;QACtC,eAAU,GAAY,KAAK,CAAC;QAC5B,oBAAe,GAAQ,IAAI,CAAC;IAChC,CAAC;IAAD,qBAAC;AAAD,CAAC,AAND,IAMC;AANY,wCAAc"} \ No newline at end of file diff --git a/src/json2typescript/json-convert-options.ts b/src/json2typescript/json-convert-options.ts index 4b63ab3..9d56184 100644 --- a/src/json2typescript/json-convert-options.ts +++ b/src/json2typescript/json-convert-options.ts @@ -3,17 +3,49 @@ import "reflect-metadata"; export class MetadataTool { constructor(public metadataKey: string) { } - get(target: any) { + get(target: any): T | undefined { return Reflect.getMetadata(this.metadataKey, target); } - getOwn(target: any) { + getOrFail(target: any): T { + const result = this.get(target); + if (result == null) { + throw new Error("MetadataTool.getOrFail: no data found for key (" + this.metadataKey + ")"); + } + return result; + } + getOrInit(target: any, defaultValue: () => T): T { + let result = this.get(target); + if (result == null) { + result = defaultValue(); + this.set(result, target); + } + return result; + } + getOwnOrInit(target: any, defaultValue: () => T): T { + let result = this.getOwn(target); + if (result == null) { + result = defaultValue(); + this.set(result, target); + } + return result; + } + getOwnOrInitFromAncestors(target: any, defaultValue: (firstAncestorValue: T | undefined | null) => T): T { + let result = this.getOwn(target); + if (result == null) { + let ancestorValue = this.get(target); + result = defaultValue(ancestorValue); + this.set(result, target); + } + return result; + } + getOwn(target: any): T | undefined { return Reflect.getOwnMetadata(this.metadataKey, target); } - hasOwn(target: any) { + hasOwn(target: any): boolean { return Reflect.hasOwnMetadata(this.metadataKey, target); } - set(value: T, target: any) { - return Reflect.defineMetadata(this.metadataKey, value, target); + set(value: T, target: any): void { + Reflect.defineMetadata(this.metadataKey, value, target); } } @@ -24,6 +56,7 @@ export namespace Settings { export const mapping = new MetadataTool("__jsonconvert__mapping__"); export const mapper = new MetadataTool("__jsonconvert__mapper__"); export const propertyClass = new MetadataTool("__jsonconvert__property_class__"); + export const classProperties = new MetadataTool("__jsonconvert__class_properties__"); } /** diff --git a/src/json2typescript/json-convert.js b/src/json2typescript/json-convert.js index 9a777d8..91d6cbe 100644 --- a/src/json2typescript/json-convert.js +++ b/src/json2typescript/json-convert.js @@ -128,8 +128,11 @@ var JsonConvert = (function () { console.log(jsonObject); } var instance = new classReference(); - for (var _i = 0, _a = Object.keys(instance); _i < _a.length; _i++) { - var propertyKey = _a[_i]; + var explicitKeys = json_convert_options_1.Settings.classProperties.get(instance) || []; + var extraKeys = explicitKeys.filter(function (k) { return !(k in instance); }); + var propertyKeys = Object.keys(instance).concat(extraKeys); + for (var _i = 0, propertyKeys_1 = propertyKeys; _i < propertyKeys_1.length; _i++) { + var propertyKey = propertyKeys_1[_i]; this.deserializeObject_loopProperty(instance, propertyKey, jsonObject); } if (this.operationMode === json_convert_enums_1.OperationMode.LOGGING) { diff --git a/src/json2typescript/json-convert.js.map b/src/json2typescript/json-convert.js.map index d3d7028..fb7892e 100644 --- a/src/json2typescript/json-convert.js.map +++ b/src/json2typescript/json-convert.js.map @@ -1 +1 @@ -{"version":3,"file":"json-convert.js","sourceRoot":"","sources":["../src/json2typescript/json-convert.ts"],"names":[],"mappings":";;AAAA,2DAAwE;AACxE,+DAAkE;AAClE,6BAA4B;AAQ5B;IA0HI,qBAAY,aAAsB,EAAE,iBAA0B,EAAE,qBAA+B;QA3GvF,mBAAc,GAAW,kCAAa,CAAC,MAAM,CAAC;QAoC9C,uBAAkB,GAAW,sCAAiB,CAAC,iBAAiB,CAAC;QAkCjE,2BAAsB,GAAY,KAAK,CAAC;QAsC5C,EAAE,CAAC,CAAC,aAAa,IAAI,IAAI,IAAI,aAAa,IAAI,kCAAa,CAAC;YAAC,IAAI,CAAC,aAAa,GAAG,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gB,EAAE,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC;YACrD,CAAC;YAAC,IAAI,CAAC,EAAE,CAAC,CAAC,gBAAgB,KAAK,SAAS,CAAC,CAAC,CAAC;gBACxC,MAAM,CAAC,WAAW,CAAA;YACtB,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,MAAM,CAAC,OAAO,CAAC;YACnB,CAAC;QACL,CAAC;IAEL,CAAC;IASO,iCAAW,GAAnB,UAAoB,SAAc;QAE9B,EAAE,CAAC,CAAC,SAAS,KAAK,IAAI,CAAC;YAAC,MAAM,CAAC,MAAM,CAAC;QAEtC,IAAI,IAAI,GAAW,EAAE,CAAC;QAEtB,EAAE,CAAC,CAAC,SAAS,YAAY,KAAK,CAAC,CAAC,CAAC;YAC7B,IAAI,GAAG,GAAG,CAAC;YACX,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBACxC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;oBAAC,IAAI,IAAI,GAAG,CAAC;gBACvB,IAAI,IAAI,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3C,CAAC;YACD,IAAI,IAAI,GAAG,CAAC;YACZ,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,OAAM,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC;IAEL,CAAC;IASO,iCAAW,GAAnB,UAAoB,SAAc;QAC9B,MAAM,CAAC,OAAM,CAAC,SAAS,CAAC,CAAC;IAC7B,CAAC;IAEL,kBAAC;AAAD,CAAC,AAxvBD,IAwvBC;AAxvBY,kCAAW"} \ No newline at end of file +{"version":3,"file":"json-convert.js","sourceRoot":"","sources":["../src/json2typescript/json-convert.ts"],"names":[],"mappings":";;AAAA,2DAAwE;AACxE,+DAAkE;AA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C,CAAC,CAAC,GAAG,CAAC,CAAC;oBAAC,IAAI,IAAI,GAAG,CAAC;gBACvB,IAAI,IAAI,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3C,CAAC;YACD,IAAI,IAAI,GAAG,CAAC;YACZ,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,CAAC,OAAM,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC;IAEL,CAAC;IASO,iCAAW,GAAnB,UAAoB,SAAc;QAC9B,MAAM,CAAC,OAAM,CAAC,SAAS,CAAC,CAAC;IAC7B,CAAC;IAEL,kBAAC;AAAD,CAAC,AA3vBD,IA2vBC;AA3vBY,kCAAW"} \ No newline at end of file diff --git a/src/json2typescript/json-convert.ts b/src/json2typescript/json-convert.ts index 5465ac8..6f4c3ac 100644 --- a/src/json2typescript/json-convert.ts +++ b/src/json2typescript/json-convert.ts @@ -318,7 +318,10 @@ export class JsonConvert { let instance = new classReference(); // Loop through all initialized class properties - for (const propertyKey of Object.keys(instance)) { + const explicitKeys = Settings.classProperties.get(instance) || []; + const extraKeys = explicitKeys.filter(k => !(k in instance)); + const propertyKeys = [...Object.keys(instance), ...extraKeys]; + for (const propertyKey of propertyKeys) { this.deserializeObject_loopProperty(instance, propertyKey, jsonObject); } diff --git a/test/json2typescript.integration.js b/test/json2typescript.integration.js deleted file mode 100644 index 441298e..0000000 --- a/test/json2typescript.integration.js +++ /dev/null @@ -1,188 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var json_convert_1 = require("../src/json2typescript/json-convert"); -var json_convert_decorators_1 = require("../src/json2typescript/json-convert-decorators"); -var json_convert_enums_1 = require("../src/json2typescript/json-convert-enums"); -var any_1 = require("../src/json2typescript/any"); -describe('Integration tests', function () { - describe('JsonConvert', function () { - // JSONCONVERT INSTANCE - var jsonConvert = new json_convert_1.JsonConvert(); - jsonConvert.operationMode = json_convert_enums_1.OperationMode.ENABLE; - jsonConvert.valueCheckingMode = json_convert_enums_1.ValueCheckingMode.ALLOW_NULL; - jsonConvert.ignorePrimitiveChecks = false; - // JSON DATA - var human1JsonObject = { - firstname: "Andreas", - lastname: "Muster" - }; - var cat1JsonObject = { - name: "Meowy", - district: 100, - owner: human1JsonObject, - birthdate: "2016-01-02", - friends: [] - }; - var dog1JsonObject = { - name: "Barky", - barking: true, - owner: null, - birthdate: "2016-01-02", - friends: [] - }; - var cat2JsonObject = { - name: "Links", - district: 50, - owner: human1JsonObject, - birthdate: "2016-01-02", - friends: [cat1JsonObject, dog1JsonObject] - }; - var animalJsonArray = [cat1JsonObject, dog1JsonObject]; - var catsJsonArray = [cat1JsonObject, cat2JsonObject]; - // TYPESCRIPT CLASSES - var DateConverter = (function () { - function DateConverter() { - } - DateConverter.prototype.serialize = function (date) { - var year = date.getFullYear(); - var month = date.getMonth() + 1; - var day = date.getDate(); - return year + "-" + (month < 10 ? "0" + month : month) + "-" + (day < 10 ? "0" + day : day); - }; - DateConverter.prototype.deserialize = function (date) { - return new Date(date); - }; - return DateConverter; - }()); - DateConverter = __decorate([ - json_convert_decorators_1.JsonConverter - ], DateConverter); - var Human = (function () { - function Human() { - this.firstname = ""; - this.lastname = ""; - } - Human.prototype.getName = function () { return this.firstname + " " + this.lastname; }; - return Human; - }()); - __decorate([ - json_convert_decorators_1.JsonProperty("firstname", String) - ], Human.prototype, "firstname", void 0); - __decorate([ - json_convert_decorators_1.JsonProperty("lastname", String) - ], Human.prototype, "lastname", void 0); - Human = __decorate([ - json_convert_decorators_1.JsonObject - ], Human); - var Animal = (function () { - function Animal() { - this.name = undefined; - this.owner = undefined; - this.birthdate = undefined; - this.friends = []; - } - return Animal; - }()); - __decorate([ - json_convert_decorators_1.JsonProperty("name", String) - ], Animal.prototype, "name", void 0); - __decorate([ - json_convert_decorators_1.JsonProperty("owner", Human, true) - ], Animal.prototype, "owner", void 0); - __decorate([ - json_convert_decorators_1.JsonProperty("birthdate", DateConverter) - ], Animal.prototype, "birthdate", void 0); - __decorate([ - json_convert_decorators_1.JsonProperty("friends", [any_1.Any], true) - ], Animal.prototype, "friends", void 0); - Animal = __decorate([ - json_convert_decorators_1.JsonObject - ], Animal); - var Cat = (function (_super) { - __extends(Cat, _super); - function Cat() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.district = undefined; - return _this; - } - return Cat; - }(Animal)); - __decorate([ - json_convert_decorators_1.JsonProperty("district", Number) - ], Cat.prototype, "district", void 0); - Cat = __decorate([ - json_convert_decorators_1.JsonObject - ], Cat); - var Dog = (function (_super) { - __extends(Dog, _super); - function Dog() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.isBarking = undefined; - return _this; - } - return Dog; - }(Animal)); - __decorate([ - json_convert_decorators_1.JsonProperty("barking", Boolean) - ], Dog.prototype, "isBarking", void 0); - Dog = __decorate([ - json_convert_decorators_1.JsonObject - ], Dog); - // TYPESCRIPT INSTANCES - var human1 = new Human(); - human1.firstname = "Andreas"; - human1.lastname = "Muster"; - var cat1 = new Cat(); - cat1.name = "Meowy"; - cat1.district = 100; - cat1.owner = human1; - cat1.birthdate = new Date("2016-01-02"); - var dog1 = new Dog(); - dog1.name = "Barky"; - dog1.isBarking = true; - dog1.owner = null; - dog1.birthdate = new Date("2016-01-02"); - var cat2 = new Cat(); - cat2.name = "Links"; - cat2.district = 50; - cat2.owner = human1; - cat2.birthdate = new Date("2016-01-02"); - cat2.friends = [cat1JsonObject, dog1JsonObject]; - var animals = [cat1, dog1]; - var cats = [cat1, cat2]; - // SERIALIZE INTEGRATION - describe('serialize', function () { - it('should serialize a TypeScript object to a JSON object', function () { - expect(jsonConvert.serialize(cat1)).toEqual(cat1JsonObject); - }); - it('should serialize a TypeScript array to a JSON array', function () { - expect(jsonConvert.serialize(animals)).toEqual(animalJsonArray); - }); - }); - // DESERIALIZE INTEGRATION - describe('deserialize', function () { - it('should deserialize a JSON object to a TypeScript object', function () { - expect(jsonConvert.deserialize(dog1JsonObject, Dog)).toEqual(dog1); - }); - it('should deserialize a JSON array to a TypeScript array', function () { - expect(jsonConvert.deserialize(catsJsonArray, Cat)).toEqual(cats); - }); - }); - }); -}); diff --git a/test/json2typescript.integration.ts b/test/json2typescript.integration.ts index f871153..57dca9e 100644 --- a/test/json2typescript.integration.ts +++ b/test/json2typescript.integration.ts @@ -47,13 +47,14 @@ describe('Integration tests', () => { @JsonConverter class DateConverter implements JsonCustomConvert { serialize(date: Date): any { - let year = date.getFullYear(); - let month = date.getMonth() + 1; - let day = date.getDate(); + let year = date.getUTCFullYear(); + let month = date.getUTCMonth() + 1; + let day = date.getUTCDate(); return year + "-" + ( month < 10 ? "0" + month : month ) + "-" + ( day < 10 ? "0" + day : day ); } + deserialize(date: any): Date { - return new Date(date); + return new Date(date + "T00:00:00.000Z"); } } @@ -69,11 +70,11 @@ describe('Integration tests', () => { @JsonObject class Animal { @JsonProperty("name", String) - name: string = undefined; + name: string; @JsonProperty("owner", Human, true) - owner: Human = undefined; + owner: Human; @JsonProperty("birthdate", DateConverter) - birthdate: Date = undefined; + birthdate: Date; @JsonProperty("friends", [Any], true) friends: any[] = []; } @@ -81,13 +82,13 @@ describe('Integration tests', () => { @JsonObject class Cat extends Animal { @JsonProperty("district", Number) - district: number = undefined; + district: number; } @JsonObject class Dog extends Animal { @JsonProperty("barking", Boolean) - isBarking: boolean = undefined; + isBarking: boolean; } // TYPESCRIPT INSTANCES diff --git a/test/json2typescript.unit.js b/test/json2typescript.unit.js deleted file mode 100644 index 6cf21a0..0000000 --- a/test/json2typescript.unit.js +++ /dev/null @@ -1,249 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var json_convert_1 = require("../src/json2typescript/json-convert"); -var json_convert_enums_1 = require("../src/json2typescript/json-convert-enums"); -var json_convert_decorators_1 = require("../src/json2typescript/json-convert-decorators"); -var any_1 = require("../src/json2typescript/any"); -describe('Unit tests', function () { - describe('JsonConvert', function () { - // JSONCONVERT INSTANCE - var jsonConvert = new json_convert_1.JsonConvert(); - jsonConvert.operationMode = json_convert_enums_1.OperationMode.ENABLE; - jsonConvert.valueCheckingMode = json_convert_enums_1.ValueCheckingMode.ALLOW_NULL; - jsonConvert.ignorePrimitiveChecks = false; - // JSON DATA - var human1JsonObject = { - firstname: "Andreas", - lastname: "Muster" - }; - var cat1JsonObject = { - name: "Meowy", - district: 100, - owner: human1JsonObject, - talky: true, - other: "cute" - }; - var cat2JsonObject = { - name: "Links", - district: 50, - owner: human1JsonObject, - talky: true, - other: "sweet" - }; - var dog1JsonObject = { - name: "Barky", - barking: true, - owner: null, - other: 1.1 - }; - var animalJsonArray = [cat1JsonObject, dog1JsonObject]; - var catsJsonArray = [cat1JsonObject, cat2JsonObject]; - // TYPESCRIPT CLASSES - var DateConverter = (function () { - function DateConverter() { - } - DateConverter.prototype.serialize = function (date) { - var year = date.getFullYear(); - var month = date.getMonth() + 1; - var day = date.getDate(); - return year + "-" + (month < 10 ? "0" + month : month) + "-" + (day < 10 ? "0" + day : day); - }; - DateConverter.prototype.deserialize = function (date) { - return new Date(date); - }; - return DateConverter; - }()); - DateConverter = __decorate([ - json_convert_decorators_1.JsonConverter - ], DateConverter); - var Human = (function () { - function Human() { - this.firstname = ""; - this.lastname = ""; - } - Human.prototype.getName = function () { - return this.firstname + " " + this.lastname; - }; - return Human; - }()); - __decorate([ - json_convert_decorators_1.JsonProperty("firstname", String) - ], Human.prototype, "firstname", void 0); - __decorate([ - json_convert_decorators_1.JsonProperty("lastname", String) - ], Human.prototype, "lastname", void 0); - Human = __decorate([ - json_convert_decorators_1.JsonObject - ], Human); - var Animal = (function () { - function Animal() { - this.name = undefined; - this.owner = undefined; - } - return Animal; - }()); - __decorate([ - json_convert_decorators_1.JsonProperty("name", String) - ], Animal.prototype, "name", void 0); - __decorate([ - json_convert_decorators_1.JsonProperty("owner", Human, true) - ], Animal.prototype, "owner", void 0); - __decorate([ - json_convert_decorators_1.JsonProperty("birthdate", DateConverter) - ], Animal.prototype, "birthdate", void 0); - Animal = __decorate([ - json_convert_decorators_1.JsonObject - ], Animal); - var Cat = (function (_super) { - __extends(Cat, _super); - function Cat() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.district = undefined; - _this.talky = undefined; - _this.other = undefined; - return _this; - } - return Cat; - }(Animal)); - __decorate([ - json_convert_decorators_1.JsonProperty() - ], Cat.prototype, "district", void 0); - __decorate([ - json_convert_decorators_1.JsonProperty() - ], Cat.prototype, "talky", void 0); - __decorate([ - json_convert_decorators_1.JsonProperty("other", String) - ], Cat.prototype, "other", void 0); - Cat = __decorate([ - json_convert_decorators_1.JsonObject - ], Cat); - var Dog = (function (_super) { - __extends(Dog, _super); - function Dog() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.isBarking = undefined; - _this.other = undefined; - return _this; - } - return Dog; - }(Animal)); - __decorate([ - json_convert_decorators_1.JsonProperty("barking", Boolean) - ], Dog.prototype, "isBarking", void 0); - __decorate([ - json_convert_decorators_1.JsonProperty("other", Number) - ], Dog.prototype, "other", void 0); - Dog = __decorate([ - json_convert_decorators_1.JsonObject - ], Dog); - // TYPESCRIPT INSTANCES - var human1 = new Human(); - human1.firstname = "Andreas"; - human1.lastname = "Muster"; - var cat1 = new Cat(); - cat1.name = "Meowy"; - cat1.district = 100; - cat1.owner = human1; - cat1.talky = true; - cat1.other = "cute"; - var cat2 = new Cat(); - cat2.name = "Links"; - cat2.district = 50; - cat2.owner = human1; - cat2.other = "sweet"; - var dog1 = new Dog(); - dog1.name = "Barky"; - dog1.isBarking = true; - dog1.owner = null; - dog1.other = 1.1; - var animals = [cat1, dog1]; - var cats = [cat1, cat2]; - // BASIC CHECKS - describe('basic checks', function () { - it('serialize and deserialize same data', function () { - var t_catJsonObject = jsonConvert.serialize(cat1); - expect(t_catJsonObject).toEqual(cat1JsonObject); - var t_cat = jsonConvert.deserialize(t_catJsonObject, Cat); - expect(t_cat).toEqual(cat1); - }); - it('deserialize and serialize same data', function () { - var t_cat = jsonConvert.deserialize(cat1JsonObject, Cat); - expect(t_cat).toEqual(cat1); - var t_catJsonObject = jsonConvert.serialize(t_cat); - expect(t_catJsonObject).toEqual(cat1JsonObject); - }); - }); - // PRIVATE METHODS - describe('private methods', function () { - it('serializeObject_loopProperty()', function () { - var t_cat = {}; - jsonConvert.serializeObject_loopProperty(cat1, "name", t_cat); - expect(t_cat["name"]).toBe(cat1.name); - jsonConvert.serializeObject_loopProperty(cat1, "district", t_cat); - expect(t_cat["district"]).toBe(100); - jsonConvert.serializeObject_loopProperty(cat1, "owner", t_cat); - expect(t_cat["owner"]["firstname"]).toBe("Andreas"); - }); - it('deserializeObject_loopProperty()', function () { - var t_cat = new Cat(); - jsonConvert.deserializeObject_loopProperty(t_cat, "name", { "name": "Meowy" }); - expect(t_cat.name).toEqual("Meowy"); - jsonConvert.deserializeObject_loopProperty(t_cat, "district", { "district": 100 }); - expect(t_cat.district).toEqual(100); - jsonConvert.deserializeObject_loopProperty(t_cat, "owner", { - "owner": { - firstname: "Andreas", - lastname: "Muster" - } - }); - expect(t_cat.owner.firstname).toEqual("Andreas"); - }); - }); - // HELPER METHODS - describe('helper methods', function () { - it('getClassPropertyMappingOptions()', function () { - expect(jsonConvert.getClassPropertyMappingOptions(cat1, "name")).not.toBeNull(); - expect(jsonConvert.getClassPropertyMappingOptions(dog1, "name")).not.toBeNull(); - expect(jsonConvert.getClassPropertyMappingOptions(human1, "name")).toBeNull(); - }); - it('verifyProperty()', function () { - expect(jsonConvert.verifyProperty(String, "Andreas", false)).toBe("Andreas"); - //expect((jsonConvert).verifyProperty(Number, "Andreas", false)).toThrow(undefined); - expect(jsonConvert.verifyProperty([String, [Boolean, Number]], ["Andreas", [true, 2.2]], false)).toEqual(["Andreas", [true, 2.2]]); - }); - }); - // JSON2TYPESCRIPT TYPES - describe('json2typescript types', function () { - it('getExpectedType()', function () { - expect(jsonConvert.getExpectedType(json_convert_1.JsonConvert)).toBe("JsonConvert"); - expect(jsonConvert.getExpectedType([String, [Boolean, Number]])).toBe("[string,[boolean,number]]"); - expect(jsonConvert.getExpectedType([[null, any_1.Any], Object])).toBe("[[any,any],any]"); - }); - it('getJsonType()', function () { - expect(jsonConvert.getJsonType({ name: "Andreas" })).toBe("object"); - expect(jsonConvert.getJsonType(["a", 0, [true, null]])).toBe("[string,number,[boolean,null]]"); - }); - it('getTrueType()', function () { - expect(jsonConvert.getTrueType(new json_convert_1.JsonConvert())).toBe("object"); - expect(jsonConvert.getTrueType({ name: "Andreas" })).toBe("object"); - expect(jsonConvert.getTrueType("Andreas")).toBe("string"); - }); - }); - }); -}); diff --git a/test/json2typescript.unit.ts b/test/json2typescript.unit.ts index 7c6ed5d..c1571de 100644 --- a/test/json2typescript.unit.ts +++ b/test/json2typescript.unit.ts @@ -10,7 +10,7 @@ describe('Unit tests', () => { describe('JsonConvert', () => { // JSONCONVERT INSTANCE - let jsonConvert = new JsonConvert(); + let jsonConvert: any = new JsonConvert(); jsonConvert.operationMode = OperationMode.ENABLE; jsonConvert.valueCheckingMode = ValueCheckingMode.ALLOW_NULL; jsonConvert.ignorePrimitiveChecks = false; @@ -25,20 +25,23 @@ describe('Unit tests', () => { district: 100, owner: human1JsonObject, talky: true, - other: "cute" + other: "cute", + birthdate: "2016-01-02", }; let cat2JsonObject = { name: "Links", district: 50, owner: human1JsonObject, talky: true, - other: "sweet" + other: "sweet", + birthdate: "2016-01-02", }; let dog1JsonObject = { name: "Barky", barking: true, owner: null, - other: 1.1 + other: 1.1, + birthdate: "2016-01-02", }; let animalJsonArray = [cat1JsonObject, dog1JsonObject]; let catsJsonArray = [cat1JsonObject, cat2JsonObject]; @@ -47,14 +50,14 @@ describe('Unit tests', () => { @JsonConverter class DateConverter implements JsonCustomConvert { serialize(date: Date): any { - let year = date.getFullYear(); - let month = date.getMonth() + 1; - let day = date.getDate(); + let year = date.getUTCFullYear(); + let month = date.getUTCMonth() + 1; + let day = date.getUTCDate(); return year + "-" + ( month < 10 ? "0" + month : month ) + "-" + ( day < 10 ? "0" + day : day ); } deserialize(date: any): Date { - return new Date(date); + return new Date(date + "T00:00:00.000Z"); } } @@ -73,9 +76,9 @@ describe('Unit tests', () => { @JsonObject class Animal { @JsonProperty("name", String) - name: string = undefined; + name: string; @JsonProperty("owner", Human, true) - owner: Human = undefined; + owner: Human; @JsonProperty("birthdate", DateConverter) birthdate: Date; } @@ -83,19 +86,19 @@ describe('Unit tests', () => { @JsonObject class Cat extends Animal { @JsonProperty() - district: number = undefined; + district: number; @JsonProperty() - talky: boolean = undefined; + talky: boolean; @JsonProperty("other", String) - other: string = undefined; + other: string; } @JsonObject class Dog extends Animal { @JsonProperty("barking", Boolean) - isBarking: boolean = undefined; + isBarking: boolean; @JsonProperty("other", Number) - other: number = undefined; + other: number; } // TYPESCRIPT INSTANCES @@ -108,32 +111,43 @@ describe('Unit tests', () => { cat1.owner = human1; cat1.talky = true; cat1.other = "cute"; + cat1.birthdate = new Date("2016-01-02"); let cat2 = new Cat(); cat2.name = "Links"; cat2.district = 50; cat2.owner = human1; cat2.other = "sweet"; + cat2.birthdate = new Date("2016-01-02"); let dog1 = new Dog(); dog1.name = "Barky"; dog1.isBarking = true; dog1.owner = null; dog1.other = 1.1; + dog1.birthdate = new Date("2016-01-02"); let animals = [cat1, dog1]; let cats = [cat1, cat2]; // BASIC CHECKS describe('basic checks', () => { - it('serialize and deserialize same data', () => { - let t_catJsonObject = (jsonConvert).serialize(cat1); - expect(t_catJsonObject).toEqual(cat1JsonObject); - let t_cat = (jsonConvert).deserialize(t_catJsonObject, Cat); - expect(t_cat).toEqual(cat1); + describe('serialize and deserialize same data', () => { + let t_catJsonObject = jsonConvert.serialize(cat1); + let t_cat = jsonConvert.deserialize(t_catJsonObject, Cat); + it('serialization', () => { + expect(t_catJsonObject).toEqual(cat1JsonObject); + }); + it('deserializization', () => { + expect(t_cat).toEqual(cat1); + }); }); - it('deserialize and serialize same data', () => { - let t_cat = (jsonConvert).deserialize(cat1JsonObject, Cat); - expect(t_cat).toEqual(cat1); - let t_catJsonObject = (jsonConvert).serialize(t_cat); - expect(t_catJsonObject).toEqual(cat1JsonObject); + describe('deserialize and serialize same data', () => { + let t_cat = jsonConvert.deserialize(cat1JsonObject, Cat); + let t_catJsonObject = jsonConvert.serialize(t_cat); + it('deserializization', () => { + expect(t_cat).toEqual(cat1); + }); + it('serialization', () => { + expect(t_catJsonObject).toEqual(cat1JsonObject); + }); }); }); @@ -141,20 +155,20 @@ describe('Unit tests', () => { describe('private methods', () => { it('serializeObject_loopProperty()', () => { let t_cat = {}; - (jsonConvert).serializeObject_loopProperty(cat1, "name", t_cat) + jsonConvert.serializeObject_loopProperty(cat1, "name", t_cat) expect(t_cat["name"]).toBe(cat1.name); - (jsonConvert).serializeObject_loopProperty(cat1, "district", t_cat) + jsonConvert.serializeObject_loopProperty(cat1, "district", t_cat) expect(t_cat["district"]).toBe(100); - (jsonConvert).serializeObject_loopProperty(cat1, "owner", t_cat) + jsonConvert.serializeObject_loopProperty(cat1, "owner", t_cat) expect(t_cat["owner"]["firstname"]).toBe("Andreas"); }); it('deserializeObject_loopProperty()', () => { let t_cat = new Cat(); - (jsonConvert).deserializeObject_loopProperty(t_cat, "name", { "name": "Meowy" }); + jsonConvert.deserializeObject_loopProperty(t_cat, "name", { "name": "Meowy" }); expect(t_cat.name).toEqual("Meowy"); - (jsonConvert).deserializeObject_loopProperty(t_cat, "district", { "district": 100 }); + jsonConvert.deserializeObject_loopProperty(t_cat, "district", { "district": 100 }); expect(t_cat.district).toEqual(100); - (jsonConvert).deserializeObject_loopProperty(t_cat, "owner", { + jsonConvert.deserializeObject_loopProperty(t_cat, "owner", { "owner": { firstname: "Andreas", lastname: "Muster" @@ -167,32 +181,32 @@ describe('Unit tests', () => { // HELPER METHODS describe('helper methods', () => { it('getClassPropertyMappingOptions()', () => { - expect((jsonConvert).getClassPropertyMappingOptions(cat1, "name")).not.toBeNull(); - expect((jsonConvert).getClassPropertyMappingOptions(dog1, "name")).not.toBeNull(); - expect((jsonConvert).getClassPropertyMappingOptions(human1, "name")).toBeNull(); + expect(jsonConvert.getClassPropertyMappingOptions(cat1, "name")).not.toBeNull(); + expect(jsonConvert.getClassPropertyMappingOptions(dog1, "name")).not.toBeNull(); + expect(jsonConvert.getClassPropertyMappingOptions(human1, "name")).toBeNull(); }); it('verifyProperty()', () => { - expect((jsonConvert).verifyProperty(String, "Andreas", false)).toBe("Andreas"); + expect(jsonConvert.verifyProperty(String, "Andreas", false)).toBe("Andreas"); //expect((jsonConvert).verifyProperty(Number, "Andreas", false)).toThrow(undefined); - expect((jsonConvert).verifyProperty([String, [Boolean, Number]], ["Andreas", [true, 2.2]], false)).toEqual(["Andreas", [true, 2.2]]); + expect(jsonConvert.verifyProperty([String, [Boolean, Number]], ["Andreas", [true, 2.2]], false)).toEqual(["Andreas", [true, 2.2]]); }); }); // JSON2TYPESCRIPT TYPES describe('json2typescript types', () => { it('getExpectedType()', () => { - expect((jsonConvert).getExpectedType(JsonConvert)).toBe("JsonConvert"); - expect((jsonConvert).getExpectedType([String, [Boolean, Number]])).toBe("[string,[boolean,number]]"); - expect((jsonConvert).getExpectedType([[null, Any], Object])).toBe("[[any,any],any]"); + expect(jsonConvert.getExpectedType(JsonConvert)).toBe("JsonConvert"); + expect(jsonConvert.getExpectedType([String, [Boolean, Number]])).toBe("[string,[boolean,number]]"); + expect(jsonConvert.getExpectedType([[null, Any], Object])).toBe("[[any,any],any]"); }); it('getJsonType()', () => { - expect((jsonConvert).getJsonType({ name: "Andreas" })).toBe("object"); - expect((jsonConvert).getJsonType(["a", 0, [true, null]])).toBe("[string,number,[boolean,null]]"); + expect(jsonConvert.getJsonType({ name: "Andreas" })).toBe("object"); + expect(jsonConvert.getJsonType(["a", 0, [true, null]])).toBe("[string,number,[boolean,null]]"); }); it('getTrueType()', () => { - expect((jsonConvert).getTrueType(new JsonConvert())).toBe("object"); - expect((jsonConvert).getTrueType({ name: "Andreas" })).toBe("object"); - expect((jsonConvert).getTrueType("Andreas")).toBe("string"); + expect(jsonConvert.getTrueType(new JsonConvert())).toBe("object"); + expect(jsonConvert.getTrueType({ name: "Andreas" })).toBe("object"); + expect(jsonConvert.getTrueType("Andreas")).toBe("string"); }); }); diff --git a/tsconfig.json b/tsconfig.json index bc640e7..75e76c3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -20,12 +20,7 @@ "test", "**/*.spec.ts" ], - "files": [ - "src/index.ts", - "src/json2typescript/json-convert", - "src/json2typescript/json-convert-decorators.ts", - "src/json2typescript/json-convert-enums.ts", - "src/json2typescript/json-convert-options.ts", - "src/json2typescript/json-custom-convert.ts" + "include": [ + "src/**/*.ts" ] } \ No newline at end of file From 8608d729f97944b6a072e2159f9837f76117c7be Mon Sep 17 00:00:00 2001 From: Franklin Davenport Date: Wed, 20 Sep 2017 17:54:08 -0500 Subject: [PATCH 10/11] v1.0.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ad89255..c9a7855 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "json2typescript", - "version": "1.0.6", + "version": "1.0.7", "description": "Provides TypeScript methods to map a JSON object to a JavaScript object on runtime", "keywords": [ "convert", From 85bfbec0f6582d3d1956646f550af2f2d7838381 Mon Sep 17 00:00:00 2001 From: Franklin Davenport Date: Wed, 25 Oct 2017 18:35:23 -0500 Subject: [PATCH 11/11] v1.0.8: Add a modified version of "Reflect.js" into the project --- Reflect.js | 1114 +++++++++++++++++ package.json | 5 +- .../json-convert-decorators.js.map | 2 +- src/json2typescript/json-convert-options.d.ts | 1 - src/json2typescript/json-convert-options.js | 2 +- .../json-convert-options.js.map | 2 +- src/json2typescript/json-convert-options.ts | 2 +- src/json2typescript/json-convert.js.map | 2 +- 8 files changed, 1122 insertions(+), 8 deletions(-) create mode 100644 Reflect.js diff --git a/Reflect.js b/Reflect.js new file mode 100644 index 0000000..d584672 --- /dev/null +++ b/Reflect.js @@ -0,0 +1,1114 @@ +// v0.1.10: https://github.com/rbuckton/reflect-metadata/blob/v0.1.10/Reflect.js +// Changes: Do not modify the global Reflect object, return a new Reflect object instead. + +/*! ***************************************************************************** +Copyright (C) Microsoft. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ +function makeReflect(Reflect) { + "use strict"; + var hasOwn = Object.prototype.hasOwnProperty; + // feature test for Symbol support + var supportsSymbol = typeof Symbol === "function"; + var toPrimitiveSymbol = supportsSymbol && typeof Symbol.toPrimitive !== "undefined" ? Symbol.toPrimitive : "@@toPrimitive"; + var iteratorSymbol = supportsSymbol && typeof Symbol.iterator !== "undefined" ? Symbol.iterator : "@@iterator"; + var HashMap; + (function (HashMap) { + var supportsCreate = typeof Object.create === "function"; // feature test for Object.create support + var supportsProto = { __proto__: [] } instanceof Array; // feature test for __proto__ support + var downLevel = !supportsCreate && !supportsProto; + // create an object in dictionary mode (a.k.a. "slow" mode in v8) + HashMap.create = supportsCreate + ? function () { return MakeDictionary(Object.create(null)); } + : supportsProto + ? function () { return MakeDictionary({ __proto__: null }); } + : function () { return MakeDictionary({}); }; + HashMap.has = downLevel + ? function (map, key) { return hasOwn.call(map, key); } + : function (map, key) { return key in map; }; + HashMap.get = downLevel + ? function (map, key) { return hasOwn.call(map, key) ? map[key] : undefined; } + : function (map, key) { return map[key]; }; + })(HashMap || (HashMap = {})); + // Load global or shim versions of Map, Set, and WeakMap + var functionPrototype = Object.getPrototypeOf(Function); + var usePolyfill = typeof process === "object" && process.env && process.env["REFLECT_METADATA_USE_MAP_POLYFILL"] === "true"; + var _Map = !usePolyfill && typeof Map === "function" && typeof Map.prototype.entries === "function" ? Map : CreateMapPolyfill(); + var _Set = !usePolyfill && typeof Set === "function" && typeof Set.prototype.entries === "function" ? Set : CreateSetPolyfill(); + var _WeakMap = !usePolyfill && typeof WeakMap === "function" ? WeakMap : CreateWeakMapPolyfill(); + // [[Metadata]] internal slot + // https://rbuckton.github.io/reflect-metadata/#ordinary-object-internal-methods-and-internal-slots + var Metadata = new _WeakMap(); + /** + * Applies a set of decorators to a property of a target object. + * @param decorators An array of decorators. + * @param target The target object. + * @param propertyKey (Optional) The property key to decorate. + * @param attributes (Optional) The property descriptor for the target key. + * @remarks Decorators are applied in reverse order. + * @example + * + * class Example { + * // property declarations are not part of ES6, though they are valid in TypeScript: + * // static staticProperty; + * // property; + * + * constructor(p) { } + * static staticMethod(p) { } + * method(p) { } + * } + * + * // constructor + * Example = Reflect.decorate(decoratorsArray, Example); + * + * // property (on constructor) + * Reflect.decorate(decoratorsArray, Example, "staticProperty"); + * + * // property (on prototype) + * Reflect.decorate(decoratorsArray, Example.prototype, "property"); + * + * // method (on constructor) + * Object.defineProperty(Example, "staticMethod", + * Reflect.decorate(decoratorsArray, Example, "staticMethod", + * Object.getOwnPropertyDescriptor(Example, "staticMethod"))); + * + * // method (on prototype) + * Object.defineProperty(Example.prototype, "method", + * Reflect.decorate(decoratorsArray, Example.prototype, "method", + * Object.getOwnPropertyDescriptor(Example.prototype, "method"))); + * + */ + function decorate(decorators, target, propertyKey, attributes) { + if (!IsUndefined(propertyKey)) { + if (!IsArray(decorators)) + throw new TypeError(); + if (!IsObject(target)) + throw new TypeError(); + if (!IsObject(attributes) && !IsUndefined(attributes) && !IsNull(attributes)) + throw new TypeError(); + if (IsNull(attributes)) + attributes = undefined; + propertyKey = ToPropertyKey(propertyKey); + return DecorateProperty(decorators, target, propertyKey, attributes); + } + else { + if (!IsArray(decorators)) + throw new TypeError(); + if (!IsConstructor(target)) + throw new TypeError(); + return DecorateConstructor(decorators, target); + } + } + Reflect.decorate = decorate; + // 4.1.2 Reflect.metadata(metadataKey, metadataValue) + // https://rbuckton.github.io/reflect-metadata/#reflect.metadata + /** + * A default metadata decorator factory that can be used on a class, class member, or parameter. + * @param metadataKey The key for the metadata entry. + * @param metadataValue The value for the metadata entry. + * @returns A decorator function. + * @remarks + * If `metadataKey` is already defined for the target and target key, the + * metadataValue for that key will be overwritten. + * @example + * + * // constructor + * @Reflect.metadata(key, value) + * class Example { + * } + * + * // property (on constructor, TypeScript only) + * class Example { + * @Reflect.metadata(key, value) + * static staticProperty; + * } + * + * // property (on prototype, TypeScript only) + * class Example { + * @Reflect.metadata(key, value) + * property; + * } + * + * // method (on constructor) + * class Example { + * @Reflect.metadata(key, value) + * static staticMethod() { } + * } + * + * // method (on prototype) + * class Example { + * @Reflect.metadata(key, value) + * method() { } + * } + * + */ + function metadata(metadataKey, metadataValue) { + function decorator(target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey) && !IsPropertyKey(propertyKey)) + throw new TypeError(); + OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey); + } + return decorator; + } + Reflect.metadata = metadata; + /** + * Define a unique metadata entry on the target. + * @param metadataKey A key used to store and retrieve metadata. + * @param metadataValue A value that contains attached metadata. + * @param target The target object on which to define metadata. + * @param propertyKey (Optional) The property key for the target. + * @example + * + * class Example { + * // property declarations are not part of ES6, though they are valid in TypeScript: + * // static staticProperty; + * // property; + * + * constructor(p) { } + * static staticMethod(p) { } + * method(p) { } + * } + * + * // constructor + * Reflect.defineMetadata("custom:annotation", options, Example); + * + * // property (on constructor) + * Reflect.defineMetadata("custom:annotation", options, Example, "staticProperty"); + * + * // property (on prototype) + * Reflect.defineMetadata("custom:annotation", options, Example.prototype, "property"); + * + * // method (on constructor) + * Reflect.defineMetadata("custom:annotation", options, Example, "staticMethod"); + * + * // method (on prototype) + * Reflect.defineMetadata("custom:annotation", options, Example.prototype, "method"); + * + * // decorator factory as metadata-producing annotation. + * function MyAnnotation(options): Decorator { + * return (target, key?) => Reflect.defineMetadata("custom:annotation", options, target, key); + * } + * + */ + function defineMetadata(metadataKey, metadataValue, target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey)) + propertyKey = ToPropertyKey(propertyKey); + return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey); + } + Reflect.defineMetadata = defineMetadata; + /** + * Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined. + * @param metadataKey A key used to store and retrieve metadata. + * @param target The target object on which the metadata is defined. + * @param propertyKey (Optional) The property key for the target. + * @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`. + * @example + * + * class Example { + * // property declarations are not part of ES6, though they are valid in TypeScript: + * // static staticProperty; + * // property; + * + * constructor(p) { } + * static staticMethod(p) { } + * method(p) { } + * } + * + * // constructor + * result = Reflect.hasMetadata("custom:annotation", Example); + * + * // property (on constructor) + * result = Reflect.hasMetadata("custom:annotation", Example, "staticProperty"); + * + * // property (on prototype) + * result = Reflect.hasMetadata("custom:annotation", Example.prototype, "property"); + * + * // method (on constructor) + * result = Reflect.hasMetadata("custom:annotation", Example, "staticMethod"); + * + * // method (on prototype) + * result = Reflect.hasMetadata("custom:annotation", Example.prototype, "method"); + * + */ + function hasMetadata(metadataKey, target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey)) + propertyKey = ToPropertyKey(propertyKey); + return OrdinaryHasMetadata(metadataKey, target, propertyKey); + } + Reflect.hasMetadata = hasMetadata; + /** + * Gets a value indicating whether the target object has the provided metadata key defined. + * @param metadataKey A key used to store and retrieve metadata. + * @param target The target object on which the metadata is defined. + * @param propertyKey (Optional) The property key for the target. + * @returns `true` if the metadata key was defined on the target object; otherwise, `false`. + * @example + * + * class Example { + * // property declarations are not part of ES6, though they are valid in TypeScript: + * // static staticProperty; + * // property; + * + * constructor(p) { } + * static staticMethod(p) { } + * method(p) { } + * } + * + * // constructor + * result = Reflect.hasOwnMetadata("custom:annotation", Example); + * + * // property (on constructor) + * result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticProperty"); + * + * // property (on prototype) + * result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "property"); + * + * // method (on constructor) + * result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticMethod"); + * + * // method (on prototype) + * result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "method"); + * + */ + function hasOwnMetadata(metadataKey, target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey)) + propertyKey = ToPropertyKey(propertyKey); + return OrdinaryHasOwnMetadata(metadataKey, target, propertyKey); + } + Reflect.hasOwnMetadata = hasOwnMetadata; + /** + * Gets the metadata value for the provided metadata key on the target object or its prototype chain. + * @param metadataKey A key used to store and retrieve metadata. + * @param target The target object on which the metadata is defined. + * @param propertyKey (Optional) The property key for the target. + * @returns The metadata value for the metadata key if found; otherwise, `undefined`. + * @example + * + * class Example { + * // property declarations are not part of ES6, though they are valid in TypeScript: + * // static staticProperty; + * // property; + * + * constructor(p) { } + * static staticMethod(p) { } + * method(p) { } + * } + * + * // constructor + * result = Reflect.getMetadata("custom:annotation", Example); + * + * // property (on constructor) + * result = Reflect.getMetadata("custom:annotation", Example, "staticProperty"); + * + * // property (on prototype) + * result = Reflect.getMetadata("custom:annotation", Example.prototype, "property"); + * + * // method (on constructor) + * result = Reflect.getMetadata("custom:annotation", Example, "staticMethod"); + * + * // method (on prototype) + * result = Reflect.getMetadata("custom:annotation", Example.prototype, "method"); + * + */ + function getMetadata(metadataKey, target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey)) + propertyKey = ToPropertyKey(propertyKey); + return OrdinaryGetMetadata(metadataKey, target, propertyKey); + } + Reflect.getMetadata = getMetadata; + /** + * Gets the metadata value for the provided metadata key on the target object. + * @param metadataKey A key used to store and retrieve metadata. + * @param target The target object on which the metadata is defined. + * @param propertyKey (Optional) The property key for the target. + * @returns The metadata value for the metadata key if found; otherwise, `undefined`. + * @example + * + * class Example { + * // property declarations are not part of ES6, though they are valid in TypeScript: + * // static staticProperty; + * // property; + * + * constructor(p) { } + * static staticMethod(p) { } + * method(p) { } + * } + * + * // constructor + * result = Reflect.getOwnMetadata("custom:annotation", Example); + * + * // property (on constructor) + * result = Reflect.getOwnMetadata("custom:annotation", Example, "staticProperty"); + * + * // property (on prototype) + * result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "property"); + * + * // method (on constructor) + * result = Reflect.getOwnMetadata("custom:annotation", Example, "staticMethod"); + * + * // method (on prototype) + * result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "method"); + * + */ + function getOwnMetadata(metadataKey, target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey)) + propertyKey = ToPropertyKey(propertyKey); + return OrdinaryGetOwnMetadata(metadataKey, target, propertyKey); + } + Reflect.getOwnMetadata = getOwnMetadata; + /** + * Gets the metadata keys defined on the target object or its prototype chain. + * @param target The target object on which the metadata is defined. + * @param propertyKey (Optional) The property key for the target. + * @returns An array of unique metadata keys. + * @example + * + * class Example { + * // property declarations are not part of ES6, though they are valid in TypeScript: + * // static staticProperty; + * // property; + * + * constructor(p) { } + * static staticMethod(p) { } + * method(p) { } + * } + * + * // constructor + * result = Reflect.getMetadataKeys(Example); + * + * // property (on constructor) + * result = Reflect.getMetadataKeys(Example, "staticProperty"); + * + * // property (on prototype) + * result = Reflect.getMetadataKeys(Example.prototype, "property"); + * + * // method (on constructor) + * result = Reflect.getMetadataKeys(Example, "staticMethod"); + * + * // method (on prototype) + * result = Reflect.getMetadataKeys(Example.prototype, "method"); + * + */ + function getMetadataKeys(target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey)) + propertyKey = ToPropertyKey(propertyKey); + return OrdinaryMetadataKeys(target, propertyKey); + } + Reflect.getMetadataKeys = getMetadataKeys; + /** + * Gets the unique metadata keys defined on the target object. + * @param target The target object on which the metadata is defined. + * @param propertyKey (Optional) The property key for the target. + * @returns An array of unique metadata keys. + * @example + * + * class Example { + * // property declarations are not part of ES6, though they are valid in TypeScript: + * // static staticProperty; + * // property; + * + * constructor(p) { } + * static staticMethod(p) { } + * method(p) { } + * } + * + * // constructor + * result = Reflect.getOwnMetadataKeys(Example); + * + * // property (on constructor) + * result = Reflect.getOwnMetadataKeys(Example, "staticProperty"); + * + * // property (on prototype) + * result = Reflect.getOwnMetadataKeys(Example.prototype, "property"); + * + * // method (on constructor) + * result = Reflect.getOwnMetadataKeys(Example, "staticMethod"); + * + * // method (on prototype) + * result = Reflect.getOwnMetadataKeys(Example.prototype, "method"); + * + */ + function getOwnMetadataKeys(target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey)) + propertyKey = ToPropertyKey(propertyKey); + return OrdinaryOwnMetadataKeys(target, propertyKey); + } + Reflect.getOwnMetadataKeys = getOwnMetadataKeys; + /** + * Deletes the metadata entry from the target object with the provided key. + * @param metadataKey A key used to store and retrieve metadata. + * @param target The target object on which the metadata is defined. + * @param propertyKey (Optional) The property key for the target. + * @returns `true` if the metadata entry was found and deleted; otherwise, false. + * @example + * + * class Example { + * // property declarations are not part of ES6, though they are valid in TypeScript: + * // static staticProperty; + * // property; + * + * constructor(p) { } + * static staticMethod(p) { } + * method(p) { } + * } + * + * // constructor + * result = Reflect.deleteMetadata("custom:annotation", Example); + * + * // property (on constructor) + * result = Reflect.deleteMetadata("custom:annotation", Example, "staticProperty"); + * + * // property (on prototype) + * result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "property"); + * + * // method (on constructor) + * result = Reflect.deleteMetadata("custom:annotation", Example, "staticMethod"); + * + * // method (on prototype) + * result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "method"); + * + */ + function deleteMetadata(metadataKey, target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey)) + propertyKey = ToPropertyKey(propertyKey); + var metadataMap = GetOrCreateMetadataMap(target, propertyKey, /*Create*/ false); + if (IsUndefined(metadataMap)) + return false; + if (!metadataMap.delete(metadataKey)) + return false; + if (metadataMap.size > 0) + return true; + var targetMetadata = Metadata.get(target); + targetMetadata.delete(propertyKey); + if (targetMetadata.size > 0) + return true; + Metadata.delete(target); + return true; + } + Reflect.deleteMetadata = deleteMetadata; + function DecorateConstructor(decorators, target) { + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + var decorated = decorator(target); + if (!IsUndefined(decorated) && !IsNull(decorated)) { + if (!IsConstructor(decorated)) + throw new TypeError(); + target = decorated; + } + } + return target; + } + function DecorateProperty(decorators, target, propertyKey, descriptor) { + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + var decorated = decorator(target, propertyKey, descriptor); + if (!IsUndefined(decorated) && !IsNull(decorated)) { + if (!IsObject(decorated)) + throw new TypeError(); + descriptor = decorated; + } + } + return descriptor; + } + function GetOrCreateMetadataMap(O, P, Create) { + var targetMetadata = Metadata.get(O); + if (IsUndefined(targetMetadata)) { + if (!Create) + return undefined; + targetMetadata = new _Map(); + Metadata.set(O, targetMetadata); + } + var metadataMap = targetMetadata.get(P); + if (IsUndefined(metadataMap)) { + if (!Create) + return undefined; + metadataMap = new _Map(); + targetMetadata.set(P, metadataMap); + } + return metadataMap; + } + // 3.1.1.1 OrdinaryHasMetadata(MetadataKey, O, P) + // https://rbuckton.github.io/reflect-metadata/#ordinaryhasmetadata + function OrdinaryHasMetadata(MetadataKey, O, P) { + var hasOwn = OrdinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) + return true; + var parent = OrdinaryGetPrototypeOf(O); + if (!IsNull(parent)) + return OrdinaryHasMetadata(MetadataKey, parent, P); + return false; + } + // 3.1.2.1 OrdinaryHasOwnMetadata(MetadataKey, O, P) + // https://rbuckton.github.io/reflect-metadata/#ordinaryhasownmetadata + function OrdinaryHasOwnMetadata(MetadataKey, O, P) { + var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false); + if (IsUndefined(metadataMap)) + return false; + return ToBoolean(metadataMap.has(MetadataKey)); + } + // 3.1.3.1 OrdinaryGetMetadata(MetadataKey, O, P) + // https://rbuckton.github.io/reflect-metadata/#ordinarygetmetadata + function OrdinaryGetMetadata(MetadataKey, O, P) { + var hasOwn = OrdinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) + return OrdinaryGetOwnMetadata(MetadataKey, O, P); + var parent = OrdinaryGetPrototypeOf(O); + if (!IsNull(parent)) + return OrdinaryGetMetadata(MetadataKey, parent, P); + return undefined; + } + // 3.1.4.1 OrdinaryGetOwnMetadata(MetadataKey, O, P) + // https://rbuckton.github.io/reflect-metadata/#ordinarygetownmetadata + function OrdinaryGetOwnMetadata(MetadataKey, O, P) { + var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false); + if (IsUndefined(metadataMap)) + return undefined; + return metadataMap.get(MetadataKey); + } + // 3.1.5.1 OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) + // https://rbuckton.github.io/reflect-metadata/#ordinarydefineownmetadata + function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) { + var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ true); + metadataMap.set(MetadataKey, MetadataValue); + } + // 3.1.6.1 OrdinaryMetadataKeys(O, P) + // https://rbuckton.github.io/reflect-metadata/#ordinarymetadatakeys + function OrdinaryMetadataKeys(O, P) { + var ownKeys = OrdinaryOwnMetadataKeys(O, P); + var parent = OrdinaryGetPrototypeOf(O); + if (parent === null) + return ownKeys; + var parentKeys = OrdinaryMetadataKeys(parent, P); + if (parentKeys.length <= 0) + return ownKeys; + if (ownKeys.length <= 0) + return parentKeys; + var set = new _Set(); + var keys = []; + for (var _i = 0, ownKeys_1 = ownKeys; _i < ownKeys_1.length; _i++) { + var key = ownKeys_1[_i]; + var hasKey = set.has(key); + if (!hasKey) { + set.add(key); + keys.push(key); + } + } + for (var _a = 0, parentKeys_1 = parentKeys; _a < parentKeys_1.length; _a++) { + var key = parentKeys_1[_a]; + var hasKey = set.has(key); + if (!hasKey) { + set.add(key); + keys.push(key); + } + } + return keys; + } + // 3.1.7.1 OrdinaryOwnMetadataKeys(O, P) + // https://rbuckton.github.io/reflect-metadata/#ordinaryownmetadatakeys + function OrdinaryOwnMetadataKeys(O, P) { + var keys = []; + var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false); + if (IsUndefined(metadataMap)) + return keys; + var keysObj = metadataMap.keys(); + var iterator = GetIterator(keysObj); + var k = 0; + while (true) { + var next = IteratorStep(iterator); + if (!next) { + keys.length = k; + return keys; + } + var nextValue = IteratorValue(next); + try { + keys[k] = nextValue; + } + catch (e) { + try { + IteratorClose(iterator); + } + finally { + throw e; + } + } + k++; + } + } + // 6 ECMAScript Data Typ0es and Values + // https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values + function Type(x) { + if (x === null) + return 1 /* Null */; + switch (typeof x) { + case "undefined": return 0 /* Undefined */; + case "boolean": return 2 /* Boolean */; + case "string": return 3 /* String */; + case "symbol": return 4 /* Symbol */; + case "number": return 5 /* Number */; + case "object": return x === null ? 1 /* Null */ : 6 /* Object */; + default: return 6 /* Object */; + } + } + // 6.1.1 The Undefined Type + // https://tc39.github.io/ecma262/#sec-ecmascript-language-types-undefined-type + function IsUndefined(x) { + return x === undefined; + } + // 6.1.2 The Null Type + // https://tc39.github.io/ecma262/#sec-ecmascript-language-types-null-type + function IsNull(x) { + return x === null; + } + // 6.1.5 The Symbol Type + // https://tc39.github.io/ecma262/#sec-ecmascript-language-types-symbol-type + function IsSymbol(x) { + return typeof x === "symbol"; + } + // 6.1.7 The Object Type + // https://tc39.github.io/ecma262/#sec-object-type + function IsObject(x) { + return typeof x === "object" ? x !== null : typeof x === "function"; + } + // 7.1 Type Conversion + // https://tc39.github.io/ecma262/#sec-type-conversion + // 7.1.1 ToPrimitive(input [, PreferredType]) + // https://tc39.github.io/ecma262/#sec-toprimitive + function ToPrimitive(input, PreferredType) { + switch (Type(input)) { + case 0 /* Undefined */: return input; + case 1 /* Null */: return input; + case 2 /* Boolean */: return input; + case 3 /* String */: return input; + case 4 /* Symbol */: return input; + case 5 /* Number */: return input; + } + var hint = PreferredType === 3 /* String */ ? "string" : PreferredType === 5 /* Number */ ? "number" : "default"; + var exoticToPrim = GetMethod(input, toPrimitiveSymbol); + if (exoticToPrim !== undefined) { + var result = exoticToPrim.call(input, hint); + if (IsObject(result)) + throw new TypeError(); + return result; + } + return OrdinaryToPrimitive(input, hint === "default" ? "number" : hint); + } + // 7.1.1.1 OrdinaryToPrimitive(O, hint) + // https://tc39.github.io/ecma262/#sec-ordinarytoprimitive + function OrdinaryToPrimitive(O, hint) { + if (hint === "string") { + var toString_1 = O.toString; + if (IsCallable(toString_1)) { + var result = toString_1.call(O); + if (!IsObject(result)) + return result; + } + var valueOf = O.valueOf; + if (IsCallable(valueOf)) { + var result = valueOf.call(O); + if (!IsObject(result)) + return result; + } + } + else { + var valueOf = O.valueOf; + if (IsCallable(valueOf)) { + var result = valueOf.call(O); + if (!IsObject(result)) + return result; + } + var toString_2 = O.toString; + if (IsCallable(toString_2)) { + var result = toString_2.call(O); + if (!IsObject(result)) + return result; + } + } + throw new TypeError(); + } + // 7.1.2 ToBoolean(argument) + // https://tc39.github.io/ecma262/2016/#sec-toboolean + function ToBoolean(argument) { + return !!argument; + } + // 7.1.12 ToString(argument) + // https://tc39.github.io/ecma262/#sec-tostring + function ToString(argument) { + return "" + argument; + } + // 7.1.14 ToPropertyKey(argument) + // https://tc39.github.io/ecma262/#sec-topropertykey + function ToPropertyKey(argument) { + var key = ToPrimitive(argument, 3 /* String */); + if (IsSymbol(key)) + return key; + return ToString(key); + } + // 7.2 Testing and Comparison Operations + // https://tc39.github.io/ecma262/#sec-testing-and-comparison-operations + // 7.2.2 IsArray(argument) + // https://tc39.github.io/ecma262/#sec-isarray + function IsArray(argument) { + return Array.isArray + ? Array.isArray(argument) + : argument instanceof Object + ? argument instanceof Array + : Object.prototype.toString.call(argument) === "[object Array]"; + } + // 7.2.3 IsCallable(argument) + // https://tc39.github.io/ecma262/#sec-iscallable + function IsCallable(argument) { + // NOTE: This is an approximation as we cannot check for [[Call]] internal method. + return typeof argument === "function"; + } + // 7.2.4 IsConstructor(argument) + // https://tc39.github.io/ecma262/#sec-isconstructor + function IsConstructor(argument) { + // NOTE: This is an approximation as we cannot check for [[Construct]] internal method. + return typeof argument === "function"; + } + // 7.2.7 IsPropertyKey(argument) + // https://tc39.github.io/ecma262/#sec-ispropertykey + function IsPropertyKey(argument) { + switch (Type(argument)) { + case 3 /* String */: return true; + case 4 /* Symbol */: return true; + default: return false; + } + } + // 7.3 Operations on Objects + // https://tc39.github.io/ecma262/#sec-operations-on-objects + // 7.3.9 GetMethod(V, P) + // https://tc39.github.io/ecma262/#sec-getmethod + function GetMethod(V, P) { + var func = V[P]; + if (func === undefined || func === null) + return undefined; + if (!IsCallable(func)) + throw new TypeError(); + return func; + } + // 7.4 Operations on Iterator Objects + // https://tc39.github.io/ecma262/#sec-operations-on-iterator-objects + function GetIterator(obj) { + var method = GetMethod(obj, iteratorSymbol); + if (!IsCallable(method)) + throw new TypeError(); // from Call + var iterator = method.call(obj); + if (!IsObject(iterator)) + throw new TypeError(); + return iterator; + } + // 7.4.4 IteratorValue(iterResult) + // https://tc39.github.io/ecma262/2016/#sec-iteratorvalue + function IteratorValue(iterResult) { + return iterResult.value; + } + // 7.4.5 IteratorStep(iterator) + // https://tc39.github.io/ecma262/#sec-iteratorstep + function IteratorStep(iterator) { + var result = iterator.next(); + return result.done ? false : result; + } + // 7.4.6 IteratorClose(iterator, completion) + // https://tc39.github.io/ecma262/#sec-iteratorclose + function IteratorClose(iterator) { + var f = iterator["return"]; + if (f) + f.call(iterator); + } + // 9.1 Ordinary Object Internal Methods and Internal Slots + // https://tc39.github.io/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots + // 9.1.1.1 OrdinaryGetPrototypeOf(O) + // https://tc39.github.io/ecma262/#sec-ordinarygetprototypeof + function OrdinaryGetPrototypeOf(O) { + var proto = Object.getPrototypeOf(O); + if (typeof O !== "function" || O === functionPrototype) + return proto; + // TypeScript doesn't set __proto__ in ES5, as it's non-standard. + // Try to determine the superclass constructor. Compatible implementations + // must either set __proto__ on a subclass constructor to the superclass constructor, + // or ensure each class has a valid `constructor` property on its prototype that + // points back to the constructor. + // If this is not the same as Function.[[Prototype]], then this is definately inherited. + // This is the case when in ES6 or when using __proto__ in a compatible browser. + if (proto !== functionPrototype) + return proto; + // If the super prototype is Object.prototype, null, or undefined, then we cannot determine the heritage. + var prototype = O.prototype; + var prototypeProto = prototype && Object.getPrototypeOf(prototype); + if (prototypeProto == null || prototypeProto === Object.prototype) + return proto; + // If the constructor was not a function, then we cannot determine the heritage. + var constructor = prototypeProto.constructor; + if (typeof constructor !== "function") + return proto; + // If we have some kind of self-reference, then we cannot determine the heritage. + if (constructor === O) + return proto; + // we have a pretty good guess at the heritage. + return constructor; + } + // naive Map shim + function CreateMapPolyfill() { + var cacheSentinel = {}; + var arraySentinel = []; + var MapIterator = (function () { + function MapIterator(keys, values, selector) { + this._index = 0; + this._keys = keys; + this._values = values; + this._selector = selector; + } + MapIterator.prototype["@@iterator"] = function () { return this; }; + MapIterator.prototype[iteratorSymbol] = function () { return this; }; + MapIterator.prototype.next = function () { + var index = this._index; + if (index >= 0 && index < this._keys.length) { + var result = this._selector(this._keys[index], this._values[index]); + if (index + 1 >= this._keys.length) { + this._index = -1; + this._keys = arraySentinel; + this._values = arraySentinel; + } + else { + this._index++; + } + return { value: result, done: false }; + } + return { value: undefined, done: true }; + }; + MapIterator.prototype.throw = function (error) { + if (this._index >= 0) { + this._index = -1; + this._keys = arraySentinel; + this._values = arraySentinel; + } + throw error; + }; + MapIterator.prototype.return = function (value) { + if (this._index >= 0) { + this._index = -1; + this._keys = arraySentinel; + this._values = arraySentinel; + } + return { value: value, done: true }; + }; + return MapIterator; + }()); + return (function () { + function Map() { + this._keys = []; + this._values = []; + this._cacheKey = cacheSentinel; + this._cacheIndex = -2; + } + Object.defineProperty(Map.prototype, "size", { + get: function () { return this._keys.length; }, + enumerable: true, + configurable: true + }); + Map.prototype.has = function (key) { return this._find(key, /*insert*/ false) >= 0; }; + Map.prototype.get = function (key) { + var index = this._find(key, /*insert*/ false); + return index >= 0 ? this._values[index] : undefined; + }; + Map.prototype.set = function (key, value) { + var index = this._find(key, /*insert*/ true); + this._values[index] = value; + return this; + }; + Map.prototype.delete = function (key) { + var index = this._find(key, /*insert*/ false); + if (index >= 0) { + var size = this._keys.length; + for (var i = index + 1; i < size; i++) { + this._keys[i - 1] = this._keys[i]; + this._values[i - 1] = this._values[i]; + } + this._keys.length--; + this._values.length--; + if (key === this._cacheKey) { + this._cacheKey = cacheSentinel; + this._cacheIndex = -2; + } + return true; + } + return false; + }; + Map.prototype.clear = function () { + this._keys.length = 0; + this._values.length = 0; + this._cacheKey = cacheSentinel; + this._cacheIndex = -2; + }; + Map.prototype.keys = function () { return new MapIterator(this._keys, this._values, getKey); }; + Map.prototype.values = function () { return new MapIterator(this._keys, this._values, getValue); }; + Map.prototype.entries = function () { return new MapIterator(this._keys, this._values, getEntry); }; + Map.prototype["@@iterator"] = function () { return this.entries(); }; + Map.prototype[iteratorSymbol] = function () { return this.entries(); }; + Map.prototype._find = function (key, insert) { + if (this._cacheKey !== key) { + this._cacheIndex = this._keys.indexOf(this._cacheKey = key); + } + if (this._cacheIndex < 0 && insert) { + this._cacheIndex = this._keys.length; + this._keys.push(key); + this._values.push(undefined); + } + return this._cacheIndex; + }; + return Map; + }()); + function getKey(key, _) { + return key; + } + function getValue(_, value) { + return value; + } + function getEntry(key, value) { + return [key, value]; + } + } + // naive Set shim + function CreateSetPolyfill() { + return (function () { + function Set() { + this._map = new _Map(); + } + Object.defineProperty(Set.prototype, "size", { + get: function () { return this._map.size; }, + enumerable: true, + configurable: true + }); + Set.prototype.has = function (value) { return this._map.has(value); }; + Set.prototype.add = function (value) { return this._map.set(value, value), this; }; + Set.prototype.delete = function (value) { return this._map.delete(value); }; + Set.prototype.clear = function () { this._map.clear(); }; + Set.prototype.keys = function () { return this._map.keys(); }; + Set.prototype.values = function () { return this._map.values(); }; + Set.prototype.entries = function () { return this._map.entries(); }; + Set.prototype["@@iterator"] = function () { return this.keys(); }; + Set.prototype[iteratorSymbol] = function () { return this.keys(); }; + return Set; + }()); + } + // naive WeakMap shim + function CreateWeakMapPolyfill() { + var UUID_SIZE = 16; + var keys = HashMap.create(); + var rootKey = CreateUniqueKey(); + return (function () { + function WeakMap() { + this._key = CreateUniqueKey(); + } + WeakMap.prototype.has = function (target) { + var table = GetOrCreateWeakMapTable(target, /*create*/ false); + return table !== undefined ? HashMap.has(table, this._key) : false; + }; + WeakMap.prototype.get = function (target) { + var table = GetOrCreateWeakMapTable(target, /*create*/ false); + return table !== undefined ? HashMap.get(table, this._key) : undefined; + }; + WeakMap.prototype.set = function (target, value) { + var table = GetOrCreateWeakMapTable(target, /*create*/ true); + table[this._key] = value; + return this; + }; + WeakMap.prototype.delete = function (target) { + var table = GetOrCreateWeakMapTable(target, /*create*/ false); + return table !== undefined ? delete table[this._key] : false; + }; + WeakMap.prototype.clear = function () { + // NOTE: not a real clear, just makes the previous data unreachable + this._key = CreateUniqueKey(); + }; + return WeakMap; + }()); + function CreateUniqueKey() { + var key; + do + key = "@@WeakMap@@" + CreateUUID(); + while (HashMap.has(keys, key)); + keys[key] = true; + return key; + } + function GetOrCreateWeakMapTable(target, create) { + if (!hasOwn.call(target, rootKey)) { + if (!create) + return undefined; + Object.defineProperty(target, rootKey, { value: HashMap.create() }); + } + return target[rootKey]; + } + function FillRandomBytes(buffer, size) { + for (var i = 0; i < size; ++i) + buffer[i] = Math.random() * 0xff | 0; + return buffer; + } + function GenRandomBytes(size) { + if (typeof Uint8Array === "function") { + if (typeof crypto !== "undefined") + return crypto.getRandomValues(new Uint8Array(size)); + if (typeof msCrypto !== "undefined") + return msCrypto.getRandomValues(new Uint8Array(size)); + return FillRandomBytes(new Uint8Array(size), size); + } + return FillRandomBytes(new Array(size), size); + } + function CreateUUID() { + var data = GenRandomBytes(UUID_SIZE); + // mark as random - RFC 4122 ยง 4.4 + data[6] = data[6] & 0x4f | 0x40; + data[8] = data[8] & 0xbf | 0x80; + var result = ""; + for (var offset = 0; offset < UUID_SIZE; ++offset) { + var byte = data[offset]; + if (offset === 4 || offset === 6 || offset === 8) + result += "-"; + if (byte < 16) + result += "0"; + result += byte.toString(16).toLowerCase(); + } + return result; + } + } + // uses a heuristic used by v8 and chakra to force an object into dictionary mode. + function MakeDictionary(obj) { + obj.__ = undefined; + delete obj.__; + return obj; + } + + return Reflect +} + +var Reflect = makeReflect({}); +module.exports = exports = Reflect; diff --git a/package.json b/package.json index c9a7855..5b5c26a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "json2typescript", - "version": "1.0.7", + "version": "1.0.8", "description": "Provides TypeScript methods to map a JSON object to a JavaScript object on runtime", "keywords": [ "convert", @@ -31,9 +31,10 @@ "definition": "dist/index.d.ts" }, "dependencies": { - "reflect-metadata": "^0.1.10" + "@types/node": "^8.0.27" }, "devDependencies": { + "@types/node": "^8.0.0", "@types/jasmine": "^2.5.52", "jasmine": "2.6.0", "karma": "^1.7.0", diff --git a/src/json2typescript/json-convert-decorators.js.map b/src/json2typescript/json-convert-decorators.js.map index c87be03..f8228c2 100644 --- a/src/json2typescript/json-convert-decorators.js.map +++ b/src/json2typescript/json-convert-decorators.js.map @@ -1 +1 @@ -{"version":3,"file":"json-convert-decorators.js","sourceRoot":"","sources":["../src/json2typescript/json-convert-decorators.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,+DAAkE;AAClE,6BAA4B;AAO5B,uBAA8B,MAAW;IACrC,+BAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;AACpC,CAAC;AAFD,sCAEC;AAOD,oBAA2B,MAAW;IAClC,+BAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;AACrC,CAAC;AAFD,gCAEC;AAoBD;IAA6B,gBAAgB;SAAhB,UAAgB,E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iB,CAAC,CAAC;IAG9G,CAAC,CAAA;AAEL,CAAC;AA5ED,oCA4EC"} \ No newline at end of file +{"version":3,"file":"json-convert-decorators.js","sourceRoot":"","sources":["../src/json2typescript/json-convert-decorators.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,+DAAkE;AAClE,6BAA4B;AAO5B,uBAA8B,MAAW;IACrC,+BAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;AACpC,CAAC;AAFD,sCAEC;AAOD,oBAA2B,MAAW;IAClC,+BAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;AACrC,CAAC;AAFD,gCAEC;AAoBD;IAA6B,gBAAgB;SAAhB,UAAgB,EAAhB,qBAAgB,EAAhB,IAAgB;QAAhB,2BAAgB;;IAEzC,IAAI,wBAAwB,GAAkB,IAAI,CAAC;IACnD,IAAI,gBAAgB,GAAQ,SAAG,CAAC;IAChC,IAAI,UAAU,GAAY,KAAK,CAAC;IAChC,IAAI,OAAO,GAAG,KAAK,CAAC;IAEpB,MAAM,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;QACpB,KAAK,CAAC;YACF,KAAK,CAAC;QACV,KAAK,CAAC;YACF,wBAAwB,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACrC,KAAK,CAAC;QACV,KAAK,CAAC;YACF,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC;gBAC1B,OAAO,GAAG,IAAI,CAAC;gBACf,KAAK,CAAC;YACV,CAAC;YACD,wBAAwB,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACrC,gBAAgB,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YAC7B,KAAK,CAAC;QACV,KAAK,CAAC;YACF,wBAAwB,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACrC,gBAAgB,GAAG,MAAM,CAAC,CAA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,IAAI,gBAAgB,EAAE,CAAC;QACxE,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,0BAA0B,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACnE,CAAC;QAGD,IAAM,OAAO,GAAG,+BAAQ,CAAC,OAAO,CAAC,yBAAyB,CAAC,MAAM,EAAE,UAAC,CAAC,IAAK,OAAA,cAAM,CAAC,EAAG,EAAV,CAAU,CAAC,CAAC;QACtF,OAAO,CAAC,SAAS,GAAG,GAAG,GAAG,iBAAiB,CAAC,GAAG,0BAA0B,CAAC;QAG1E,+BAAQ,CAAC,eAAe,CAAC,yBAAyB,CAAC,MAAM,EAAE,UAAC,CAAC,IAAK,OAAI,CAAC,CAAC,IAAI,EAAE,CAAC,UAAb,CAAc,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAG9G,CAAC,CAAA;AAEL,CAAC;AA5ED,oCA4EC"} \ No newline at end of file diff --git a/src/json2typescript/json-convert-options.d.ts b/src/json2typescript/json-convert-options.d.ts index 8102f81..1a8108c 100644 --- a/src/json2typescript/json-convert-options.d.ts +++ b/src/json2typescript/json-convert-options.d.ts @@ -1,4 +1,3 @@ -import "reflect-metadata"; export declare class MetadataTool { metadataKey: string; constructor(metadataKey: string); diff --git a/src/json2typescript/json-convert-options.js b/src/json2typescript/json-convert-options.js index 7ae7ccd..6f373ee 100644 --- a/src/json2typescript/json-convert-options.js +++ b/src/json2typescript/json-convert-options.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -require("reflect-metadata"); +var Reflect = require('../../Reflect'); var MetadataTool = (function () { function MetadataTool(metadataKey) { this.metadataKey = metadataKey; diff --git a/src/json2typescript/json-convert-options.js.map b/src/json2typescript/json-convert-options.js.map index 48b9520..ddcf289 100644 --- a/src/json2typescript/json-convert-options.js.map +++ b/src/json2typescript/json-convert-options.js.map @@ -1 +1 @@ -{"version":3,"file":"json-convert-options.js","sourceRoot":"","sources":["../src/json2typescript/json-conv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,SAAS,CAAC;QACtC,eAAU,GAAY,KAAK,CAAC;QAC5B,oBAAe,GAAQ,IAAI,CAAC;IAChC,CAAC;IAAD,qBAAC;AAAD,CAAC,AAND,IAMC;AANY,wCAAc"} \ No newline at end of file +{"version":3,"file":"json-convert-options.js","sourceRoot":"","sources":["../src/json2typescript/json-convert-options.ts"],"names":[],"mappings":";;AAAA,IAAM,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AAEzC;IACI,sBAAmB,WAAmB;QAAnB,gBAAW,GAAX,WAAW,CAAQ;IACtC,CAAC;IACD,0BAAG,GAAH,UAAI,MAAW;QACX,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACzD,CAAC;IACD,gCAAS,GAAT,UAAU,MAAW;QACjB,IAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAChC,EAAE,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,iDAAiD,GAAG,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC,CAAC;QAChG,CAAC;QACD,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IACD,gCAAS,GAAT,UAAU,MAAW,EAAE,YAAqB;QACxC,IAAI,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC9B,EAAE,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC;YACjB,MAAM,GAAG,YAAY,EAAE,CAAC;YACxB,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC7B,CAAC;QACD,MAAM,CAAC,MAAM,CAAC;IAClB,CAAC;IACD,mCAAY,GAAZ,UAAa,MAAW,EAAE,YAAqB;QAC3C,IAAI,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACjC,EAAE,CAAC,CAAC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CAAM,iCAAiC,CAAC,CAAC;IACzE,wBAAe,GAAG,IAAI,YAAY,CAAW,mCAAmC,CAAC,CAAC;AACnG,CAAC,EALgB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAKxB;AAKD;IAAA;QACI,sBAAiB,GAAW,EAAE,CAAC;QAC/B,qBAAgB,GAAW,EAAE,CAAC;QAC9B,qBAAgB,GAAY,SAAS,CAAC;QACtC,eAAU,GAAY,KAAK,CAAC;QAC5B,oBAAe,GAAQ,IAAI,CAAC;IAChC,CAAC;IAAD,qBAAC;AAAD,CAAC,AAND,IAMC;AANY,wCAAc"} \ No newline at end of file diff --git a/src/json2typescript/json-convert-options.ts b/src/json2typescript/json-convert-options.ts index 9d56184..23a5c09 100644 --- a/src/json2typescript/json-convert-options.ts +++ b/src/json2typescript/json-convert-options.ts @@ -1,4 +1,4 @@ -import "reflect-metadata"; +const Reflect = require('../../Reflect'); export class MetadataTool { constructor(public metadataKey: string) { diff --git a/src/json2typescript/json-convert.js.map b/src/json2typescript/json-convert.js.map index fb7892e..7b38bea 100644 --- a/src/json2typescript/json-convert.js.map +++ b/src/json2typescript/json-convert.js.map @@ -1 +1 @@ -{"version":3,"file":"json-convert.js","sourceRoot":"","sources":["../src/json2typescript/json-convert.ts"],"names":[],"mappings":";;AAAA,2DAAwE;AACxE,+DAAkE;AAClE,6BAA4B;AAQ5B;IA0HI,qBAAY,aAAsB,EAAE,iBAA0B,EAAE,qBAA+B;QA3GvF,mBAAc,GAAW,kCAAa,CAAC,MAAM,CAAC;QAoC9C,uBAAkB,GAAW,sCAAiB,CAAC,iBAAiB,CAAC;QAkCjE,2BAAsB,GAAY,KAAK,CAAC;QAsC5C,EAAE,CAAC,CAAC,aAAa,IAAI,IAAI,IAAI,aAAa,IAAI,kCAAa,CAAC;YAAC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QAChG,EAAE,CAAC,CAAC,iBAAiB,IAAI,IAAI,IAAI,iBAAiB,IAAI,sCAAiB,CAAC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CAAC;IAC7B,CAAC;IAEL,kBAAC;AAAD,CAAC,AA3vBD,IA2vBC;AA3vBY,kCAAW"} \ No newline at end of file +{"version":3,"file":"json-convert.js","sourceRoot":"","sources":["../src/json2typescript/json-convert.ts"],"names":[],"mappings":";;AAAA,2DAAwE;AACxE,+DAAkE;AAClE,6BAA4B;AAQ5B;IA0HI,qBAAY,aAAsB,EAAE,iBAA0B,EAAE,qBAA+B;QA3GvF,mBAAc,GAAW,kCAAa,CAAC,MAAM,CAAC;QAoC9C,uBAAkB,GAAW,sCAAiB,CAAC,iBAAiB,CAAC;QAkCjE,2BAAsB,GAAY,KAAK,CAAC;QAsC5C,EAAE,CAAC,CAAC,aAAa,IAAI,IAAI,IAAI,aAAa,IAAI,kCAAa,CAAC;YAAC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QAChG,EAAE,CAAC,CAAC,iBAAiB,IAAI,IAAI,IAAI,iBAAiB,IAAI,sCAAiB,CAAC;YAAC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QACpH,EAAE,CAAC,CAAC,qBAAqB,CAAC;YAAC,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;IAClF,CAAC;IApGD,sBAAI,sCAAa;aAAjB;YACI,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC;QAC/B,CAAC;aAWD,UAAkB,KAAa;YAC3B,EAAE,CAAC,CAAC,KAAK,IAAI,kCAAa,CAAC;gBAAC,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QAC5D,CAAC;;;OAbA;IAmCD,sBAAI,0CAAiB;aAArB;YACI,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC;QACnC,CAAC;aAYD,UAAsB,KAAa;YAC/B,EAAE,CAAC,CAAC,KAAK,IAAI,sCAAiB,CAAC;gBAAC,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;QACpE,CAAC;;;OAdA;IA4BD,sBAAI,8CAAqB;aAAzB;YACI,MAAM,CAAC,IAAI,C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