@dipscope/type-manager 5.0.0-beta.1 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/CHANGELOG.md +224 -224
  2. package/LICENSE.md +201 -201
  3. package/README.md +1857 -1846
  4. package/alias.d.ts +6 -6
  5. package/custom-data.d.ts +6 -6
  6. package/default-value-resolver.d.ts +7 -7
  7. package/default-value.d.ts +7 -7
  8. package/discriminant.d.ts +8 -8
  9. package/discriminator.d.ts +6 -6
  10. package/factories/index.d.ts +1 -1
  11. package/factories/type-factory.d.ts +19 -19
  12. package/factory.d.ts +18 -18
  13. package/functions/get-own-reflect-metadata.d.ts +9 -9
  14. package/functions/get-reflect-metadata.d.ts +10 -10
  15. package/functions/get-words.d.ts +8 -8
  16. package/functions/index.d.ts +16 -16
  17. package/functions/is-arrow-function.d.ts +8 -8
  18. package/functions/is-ctor-function.d.ts +8 -8
  19. package/functions/is-data-view.d.ts +8 -8
  20. package/functions/is-float-32-array.d.ts +8 -8
  21. package/functions/is-float-64-array.d.ts +8 -8
  22. package/functions/is-int-16-array.d.ts +8 -8
  23. package/functions/is-int-32-array.d.ts +8 -8
  24. package/functions/is-int-8-array.d.ts +8 -8
  25. package/functions/is-uint-16-array.d.ts +8 -8
  26. package/functions/is-uint-32-array.d.ts +8 -8
  27. package/functions/is-uint-8-array.d.ts +8 -8
  28. package/functions/is-uint-8-clamped-array.d.ts +8 -8
  29. package/functions/name-of.d.ts +8 -8
  30. package/generic-argument.d.ts +7 -7
  31. package/generic-metadata.d.ts +7 -7
  32. package/index.d.ts +54 -54
  33. package/index.js +1 -1
  34. package/inject-index.d.ts +6 -6
  35. package/inject-metadata.d.ts +88 -72
  36. package/inject-options.d.ts +22 -22
  37. package/inject.d.ts +10 -10
  38. package/injector.d.ts +16 -16
  39. package/injectors/index.d.ts +1 -1
  40. package/injectors/singleton-injector.d.ts +31 -31
  41. package/log-level.d.ts +11 -11
  42. package/log.d.ts +95 -95
  43. package/metadata.d.ts +42 -42
  44. package/naming-convention.d.ts +15 -15
  45. package/naming-conventions/camel-case-naming-convention.d.ts +26 -26
  46. package/naming-conventions/flat-case-naming-convention.d.ts +25 -25
  47. package/naming-conventions/flat-upper-case-naming-convention.d.ts +25 -25
  48. package/naming-conventions/index.d.ts +8 -8
  49. package/naming-conventions/kebab-case-naming-convention.d.ts +26 -26
  50. package/naming-conventions/kebab-upper-case-naming-convention.d.ts +26 -26
  51. package/naming-conventions/pascal-case-naming-convention.d.ts +26 -26
  52. package/naming-conventions/snake-case-naming-convention.d.ts +26 -26
  53. package/naming-conventions/snake-upper-case-naming-convention.d.ts +26 -26
  54. package/package.json +55 -51
  55. package/property-metadata.d.ts +309 -196
  56. package/property-name.d.ts +6 -6
  57. package/property-options.d.ts +116 -116
  58. package/property.d.ts +13 -13
  59. package/reference-callback.d.ts +7 -7
  60. package/reference-handler.d.ts +31 -31
  61. package/reference-handlers/direct-reference-handler.d.ts +32 -32
  62. package/reference-handlers/index.d.ts +3 -3
  63. package/reference-handlers/lead-reference-handler.d.ts +33 -33
  64. package/reference-handlers/path-reference-handler.d.ts +55 -55
  65. package/reference-key.d.ts +6 -6
  66. package/reference-value-getter.d.ts +7 -7
  67. package/reference-value-setter.d.ts +7 -7
  68. package/reference-value.d.ts +6 -6
  69. package/serializer-context-options.d.ts +43 -43
  70. package/serializer-context.d.ts +410 -362
  71. package/serializer.d.ts +27 -27
  72. package/serializers/array-buffer-serializer.d.ts +28 -28
  73. package/serializers/array-serializer.d.ts +28 -28
  74. package/serializers/boolean-serializer.d.ts +37 -37
  75. package/serializers/data-view-serializer.d.ts +28 -28
  76. package/serializers/date-serializer.d.ts +28 -28
  77. package/serializers/float-32-array-serializer.d.ts +28 -28
  78. package/serializers/float-64-array-serializer.d.ts +28 -28
  79. package/serializers/index.d.ts +19 -19
  80. package/serializers/int-16-array-serializer.d.ts +28 -28
  81. package/serializers/int-32-array-serializer.d.ts +28 -28
  82. package/serializers/int-8-array-serializer.d.ts +28 -28
  83. package/serializers/map-serializer.d.ts +28 -40
  84. package/serializers/number-serializer.d.ts +37 -37
  85. package/serializers/set-serializer.d.ts +28 -28
  86. package/serializers/string-serializer.d.ts +37 -37
  87. package/serializers/type-serializer.d.ts +28 -28
  88. package/serializers/uint-16-array-serializer.d.ts +28 -28
  89. package/serializers/uint-32-array-serializer.d.ts +28 -28
  90. package/serializers/uint-8-array-serializer.d.ts +28 -28
  91. package/serializers/uint-8-clamped-array-serializer.d.ts +28 -28
  92. package/type-abstraction.d.ts +8 -8
  93. package/type-argument.d.ts +9 -9
  94. package/type-context-entry.d.ts +36 -36
  95. package/type-context.d.ts +58 -58
  96. package/type-ctor.d.ts +6 -6
  97. package/type-fn.d.ts +8 -8
  98. package/type-like.d.ts +7 -7
  99. package/type-manager-options.d.ts +24 -24
  100. package/type-manager.d.ts +331 -331
  101. package/type-metadata-resolver.d.ts +8 -8
  102. package/type-metadata-symbol.d.ts +6 -6
  103. package/type-metadata.d.ts +472 -322
  104. package/type-name.d.ts +6 -6
  105. package/type-options-base.d.ts +90 -90
  106. package/type-options.d.ts +79 -79
  107. package/type-resolver.d.ts +7 -7
  108. package/type.d.ts +9 -9
@@ -1,26 +1,26 @@
1
- import { NamingConvention } from '../naming-convention';
2
- /**
3
- * Camel case naming convention.
4
- *
5
- * @type {CamelCaseNamingConvention}
6
- */
7
- export declare class CamelCaseNamingConvention implements NamingConvention {
8
- /**
9
- * Converts name from provided to target one.
10
- *
11
- * @param {string} name Name.
12
- *
13
- * @returns {string} Converted name.
14
- */
15
- convert(name: string): string;
16
- /**
17
- * Reduce function.
18
- *
19
- * @param {string} result Result string.
20
- * @param {string} word Word to process.
21
- * @param {number} index Word index.
22
- *
23
- * @returns {string} Reduced string.
24
- */
25
- private reduce;
26
- }
1
+ import { NamingConvention } from '../naming-convention';
2
+ /**
3
+ * Camel case naming convention.
4
+ *
5
+ * @type {CamelCaseNamingConvention}
6
+ */
7
+ export declare class CamelCaseNamingConvention implements NamingConvention {
8
+ /**
9
+ * Converts name from provided to target one.
10
+ *
11
+ * @param {string} name Name.
12
+ *
13
+ * @returns {string} Converted name.
14
+ */
15
+ convert(name: string): string;
16
+ /**
17
+ * Reduce function.
18
+ *
19
+ * @param {string} result Result string.
20
+ * @param {string} word Word to process.
21
+ * @param {number} index Word index.
22
+ *
23
+ * @returns {string} Reduced string.
24
+ */
25
+ private reduce;
26
+ }
@@ -1,25 +1,25 @@
1
- import { NamingConvention } from '../naming-convention';
2
- /**
3
- * Flat case naming convention.
4
- *
5
- * @type {FlatCaseNamingConvention}
6
- */
7
- export declare class FlatCaseNamingConvention implements NamingConvention {
8
- /**
9
- * Converts name from provided to target one.
10
- *
11
- * @param {string} name Name.
12
- *
13
- * @returns {string} Converted name.
14
- */
15
- convert(name: string): string;
16
- /**
17
- * Reduce function.
18
- *
19
- * @param {string} result Result string.
20
- * @param {string} word Word to process.
21
- *
22
- * @returns {string} Reduced string.
23
- */
24
- private reduce;
25
- }
1
+ import { NamingConvention } from '../naming-convention';
2
+ /**
3
+ * Flat case naming convention.
4
+ *
5
+ * @type {FlatCaseNamingConvention}
6
+ */
7
+ export declare class FlatCaseNamingConvention implements NamingConvention {
8
+ /**
9
+ * Converts name from provided to target one.
10
+ *
11
+ * @param {string} name Name.
12
+ *
13
+ * @returns {string} Converted name.
14
+ */
15
+ convert(name: string): string;
16
+ /**
17
+ * Reduce function.
18
+ *
19
+ * @param {string} result Result string.
20
+ * @param {string} word Word to process.
21
+ *
22
+ * @returns {string} Reduced string.
23
+ */
24
+ private reduce;
25
+ }
@@ -1,25 +1,25 @@
1
- import { NamingConvention } from '../naming-convention';
2
- /**
3
- * Flat upper case naming convention.
4
- *
5
- * @type {FlatUpperCaseNamingConvention}
6
- */
7
- export declare class FlatUpperCaseNamingConvention implements NamingConvention {
8
- /**
9
- * Converts name from provided to target one.
10
- *
11
- * @param {string} name Name.
12
- *
13
- * @returns {string} Converted name.
14
- */
15
- convert(name: string): string;
16
- /**
17
- * Reduce function.
18
- *
19
- * @param {string} result Result string.
20
- * @param {string} word Word to process.
21
- *
22
- * @returns {string} Reduced string.
23
- */
24
- private reduce;
25
- }
1
+ import { NamingConvention } from '../naming-convention';
2
+ /**
3
+ * Flat upper case naming convention.
4
+ *
5
+ * @type {FlatUpperCaseNamingConvention}
6
+ */
7
+ export declare class FlatUpperCaseNamingConvention implements NamingConvention {
8
+ /**
9
+ * Converts name from provided to target one.
10
+ *
11
+ * @param {string} name Name.
12
+ *
13
+ * @returns {string} Converted name.
14
+ */
15
+ convert(name: string): string;
16
+ /**
17
+ * Reduce function.
18
+ *
19
+ * @param {string} result Result string.
20
+ * @param {string} word Word to process.
21
+ *
22
+ * @returns {string} Reduced string.
23
+ */
24
+ private reduce;
25
+ }
@@ -1,8 +1,8 @@
1
- export * from './camel-case-naming-convention';
2
- export * from './flat-case-naming-convention';
3
- export * from './flat-upper-case-naming-convention';
4
- export * from './kebab-case-naming-convention';
5
- export * from './kebab-upper-case-naming-convention';
6
- export * from './pascal-case-naming-convention';
7
- export * from './snake-case-naming-convention';
8
- export * from './snake-upper-case-naming-convention';
1
+ export * from './camel-case-naming-convention';
2
+ export * from './flat-case-naming-convention';
3
+ export * from './flat-upper-case-naming-convention';
4
+ export * from './kebab-case-naming-convention';
5
+ export * from './kebab-upper-case-naming-convention';
6
+ export * from './pascal-case-naming-convention';
7
+ export * from './snake-case-naming-convention';
8
+ export * from './snake-upper-case-naming-convention';
@@ -1,26 +1,26 @@
1
- import { NamingConvention } from '../naming-convention';
2
- /**
3
- * Kebab case naming convention.
4
- *
5
- * @type {KebabCaseNamingConvention}
6
- */
7
- export declare class KebabCaseNamingConvention implements NamingConvention {
8
- /**
9
- * Converts name from provided to target one.
10
- *
11
- * @param {string} name Name.
12
- *
13
- * @returns {string} Converted name.
14
- */
15
- convert(name: string): string;
16
- /**
17
- * Reduce function.
18
- *
19
- * @param {string} result Result string.
20
- * @param {string} word Word to process.
21
- * @param {number} index Word index.
22
- *
23
- * @returns {string} Reduced string.
24
- */
25
- private reduce;
26
- }
1
+ import { NamingConvention } from '../naming-convention';
2
+ /**
3
+ * Kebab case naming convention.
4
+ *
5
+ * @type {KebabCaseNamingConvention}
6
+ */
7
+ export declare class KebabCaseNamingConvention implements NamingConvention {
8
+ /**
9
+ * Converts name from provided to target one.
10
+ *
11
+ * @param {string} name Name.
12
+ *
13
+ * @returns {string} Converted name.
14
+ */
15
+ convert(name: string): string;
16
+ /**
17
+ * Reduce function.
18
+ *
19
+ * @param {string} result Result string.
20
+ * @param {string} word Word to process.
21
+ * @param {number} index Word index.
22
+ *
23
+ * @returns {string} Reduced string.
24
+ */
25
+ private reduce;
26
+ }
@@ -1,26 +1,26 @@
1
- import { NamingConvention } from '../naming-convention';
2
- /**
3
- * Kebab upper naming case.
4
- *
5
- * @type {KebabUpperCaseNamingConvention}
6
- */
7
- export declare class KebabUpperCaseNamingConvention implements NamingConvention {
8
- /**
9
- * Converts name from provided to target one.
10
- *
11
- * @param {string} name Name.
12
- *
13
- * @returns {string} Converted name.
14
- */
15
- convert(name: string): string;
16
- /**
17
- * Reduce function.
18
- *
19
- * @param {string} result Result string.
20
- * @param {string} word Word to process.
21
- * @param {number} index Word index.
22
- *
23
- * @returns {string} Reduced string.
24
- */
25
- private reduce;
26
- }
1
+ import { NamingConvention } from '../naming-convention';
2
+ /**
3
+ * Kebab upper naming case.
4
+ *
5
+ * @type {KebabUpperCaseNamingConvention}
6
+ */
7
+ export declare class KebabUpperCaseNamingConvention implements NamingConvention {
8
+ /**
9
+ * Converts name from provided to target one.
10
+ *
11
+ * @param {string} name Name.
12
+ *
13
+ * @returns {string} Converted name.
14
+ */
15
+ convert(name: string): string;
16
+ /**
17
+ * Reduce function.
18
+ *
19
+ * @param {string} result Result string.
20
+ * @param {string} word Word to process.
21
+ * @param {number} index Word index.
22
+ *
23
+ * @returns {string} Reduced string.
24
+ */
25
+ private reduce;
26
+ }
@@ -1,26 +1,26 @@
1
- import { NamingConvention } from '../naming-convention';
2
- /**
3
- * Pascal case naming convention.
4
- *
5
- * @type {PascalCaseNamingConvention}
6
- */
7
- export declare class PascalCaseNamingConvention implements NamingConvention {
8
- /**
9
- * Converts name from provided to target one.
10
- *
11
- * @param {string} name Name.
12
- *
13
- * @returns {string} Converted name.
14
- */
15
- convert(name: string): string;
16
- /**
17
- * Reduce function.
18
- *
19
- * @param {string} result Result string.
20
- * @param {string} word Word to process.
21
- * @param {number} index Word index.
22
- *
23
- * @returns {string} Reduced string.
24
- */
25
- private reduce;
26
- }
1
+ import { NamingConvention } from '../naming-convention';
2
+ /**
3
+ * Pascal case naming convention.
4
+ *
5
+ * @type {PascalCaseNamingConvention}
6
+ */
7
+ export declare class PascalCaseNamingConvention implements NamingConvention {
8
+ /**
9
+ * Converts name from provided to target one.
10
+ *
11
+ * @param {string} name Name.
12
+ *
13
+ * @returns {string} Converted name.
14
+ */
15
+ convert(name: string): string;
16
+ /**
17
+ * Reduce function.
18
+ *
19
+ * @param {string} result Result string.
20
+ * @param {string} word Word to process.
21
+ * @param {number} index Word index.
22
+ *
23
+ * @returns {string} Reduced string.
24
+ */
25
+ private reduce;
26
+ }
@@ -1,26 +1,26 @@
1
- import { NamingConvention } from '../naming-convention';
2
- /**
3
- * Snake case naming convention.
4
- *
5
- * @type {SnakeCaseNamingConvention}
6
- */
7
- export declare class SnakeCaseNamingConvention implements NamingConvention {
8
- /**
9
- * Converts name from provided to target one.
10
- *
11
- * @param {string} name Name.
12
- *
13
- * @returns {string} Converted name.
14
- */
15
- convert(name: string): string;
16
- /**
17
- * Reduce function.
18
- *
19
- * @param {string} result Result string.
20
- * @param {string} word Word to process.
21
- * @param {number} index Word index.
22
- *
23
- * @returns {string} Reduced string.
24
- */
25
- private reduce;
26
- }
1
+ import { NamingConvention } from '../naming-convention';
2
+ /**
3
+ * Snake case naming convention.
4
+ *
5
+ * @type {SnakeCaseNamingConvention}
6
+ */
7
+ export declare class SnakeCaseNamingConvention implements NamingConvention {
8
+ /**
9
+ * Converts name from provided to target one.
10
+ *
11
+ * @param {string} name Name.
12
+ *
13
+ * @returns {string} Converted name.
14
+ */
15
+ convert(name: string): string;
16
+ /**
17
+ * Reduce function.
18
+ *
19
+ * @param {string} result Result string.
20
+ * @param {string} word Word to process.
21
+ * @param {number} index Word index.
22
+ *
23
+ * @returns {string} Reduced string.
24
+ */
25
+ private reduce;
26
+ }
@@ -1,26 +1,26 @@
1
- import { NamingConvention } from '../naming-convention';
2
- /**
3
- * Snake upper case naming convention.
4
- *
5
- * @type {SnakeUpperCaseNamingConvention}
6
- */
7
- export declare class SnakeUpperCaseNamingConvention implements NamingConvention {
8
- /**
9
- * Converts name from provided to target one.
10
- *
11
- * @param {string} name Name.
12
- *
13
- * @returns {string} Converted name.
14
- */
15
- convert(name: string): string;
16
- /**
17
- * Reduce function.
18
- *
19
- * @param {string} result Result string.
20
- * @param {string} word Word to process.
21
- * @param {number} index Word index.
22
- *
23
- * @returns {string} Reduced string.
24
- */
25
- private reduce;
26
- }
1
+ import { NamingConvention } from '../naming-convention';
2
+ /**
3
+ * Snake upper case naming convention.
4
+ *
5
+ * @type {SnakeUpperCaseNamingConvention}
6
+ */
7
+ export declare class SnakeUpperCaseNamingConvention implements NamingConvention {
8
+ /**
9
+ * Converts name from provided to target one.
10
+ *
11
+ * @param {string} name Name.
12
+ *
13
+ * @returns {string} Converted name.
14
+ */
15
+ convert(name: string): string;
16
+ /**
17
+ * Reduce function.
18
+ *
19
+ * @param {string} result Result string.
20
+ * @param {string} word Word to process.
21
+ * @param {number} index Word index.
22
+ *
23
+ * @returns {string} Reduced string.
24
+ */
25
+ private reduce;
26
+ }
package/package.json CHANGED
@@ -1,51 +1,55 @@
1
- {
2
- "author": "DipScope authors and contributors",
3
- "dependencies": {
4
- "lodash": "^4.17.21"
5
- },
6
- "description": "A package which will help you to transform your JSON strings or plain objects into JS object instances.",
7
- "devDependencies": {
8
- "@types/lodash": "^4.14.182",
9
- "@types/jasmine": "^3.6.3",
10
- "@typescript-eslint/eslint-plugin": "^4.14.2",
11
- "@typescript-eslint/parser": "^4.14.2",
12
- "circular-dependency-plugin": "^5.2.2",
13
- "eslint": "^7.19.0",
14
- "jasmine": "^3.6.4",
15
- "jasmine-spec-reporter": "^6.0.0",
16
- "jasmine-ts": "^0.3.0",
17
- "reflect-metadata": "^0.1.13",
18
- "shx": "^0.3.3",
19
- "ts-loader": "^8.0.15",
20
- "ts-node": "^8.10.2",
21
- "typescript": "^4.1.3",
22
- "webpack": "^5.21.1",
23
- "webpack-cli": "^4.5.0",
24
- "webpack-dev-server": "^3.11.2"
25
- },
26
- "keywords": [
27
- "json",
28
- "object",
29
- "entity",
30
- "class",
31
- "converter",
32
- "transformer",
33
- "manager"
34
- ],
35
- "license": "Apache-2.0",
36
- "main": "index.js",
37
- "name": "@dipscope/type-manager",
38
- "repository": {
39
- "type": "git",
40
- "url": "https://github.com/dipscope/TypeManager.TS.git"
41
- },
42
- "scripts": {
43
- "build": "npm run clean && npx webpack --config=webpack.config.js && npm run copy",
44
- "clean": "shx rm -rf dist",
45
- "copy": "shx cp CHANGELOG.md dist && shx cp LICENSE.md dist && shx cp package.json dist && shx cp README.md dist",
46
- "test": "jasmine-ts --config=jasmine.json",
47
- "lint": "eslint . --ext .ts"
48
- },
49
- "types": "index.d.ts",
50
- "version": "5.0.0-beta.1"
51
- }
1
+ {
2
+ "author": "DipScope authors and contributors",
3
+ "dependencies": {
4
+ "lodash": "^4.17.21"
5
+ },
6
+ "description": "Transform JSON strings or plain objects into JS class instances.",
7
+ "devDependencies": {
8
+ "@types/jasmine": "^3.6.3",
9
+ "@types/lodash": "^4.14.182",
10
+ "@typescript-eslint/eslint-plugin": "^4.14.2",
11
+ "@typescript-eslint/parser": "^4.14.2",
12
+ "circular-dependency-plugin": "^5.2.2",
13
+ "eslint": "^7.19.0",
14
+ "jasmine": "^3.6.4",
15
+ "jasmine-spec-reporter": "^6.0.0",
16
+ "jasmine-ts": "^0.3.0",
17
+ "reflect-metadata": "^0.1.13",
18
+ "shx": "^0.3.3",
19
+ "ts-loader": "^8.0.15",
20
+ "ts-node": "^8.10.2",
21
+ "typescript": "^4.1.3",
22
+ "webpack": "^5.74.0",
23
+ "webpack-cli": "^4.10.0",
24
+ "webpack-dev-server": "^4.9.3"
25
+ },
26
+ "keywords": [
27
+ "json",
28
+ "object",
29
+ "class",
30
+ "converter",
31
+ "transformer",
32
+ "type",
33
+ "manager",
34
+ "serializer",
35
+ "deserializer",
36
+ "reflection",
37
+ "metadata"
38
+ ],
39
+ "license": "Apache-2.0",
40
+ "main": "index.js",
41
+ "name": "@dipscope/type-manager",
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "https://github.com/dipscope/TypeManager.TS.git"
45
+ },
46
+ "scripts": {
47
+ "build": "npm run clean && npx webpack --config=webpack.config.js && npm run copy",
48
+ "clean": "shx rm -rf dist",
49
+ "copy": "shx cp CHANGELOG.md dist && shx cp LICENSE.md dist && shx cp package.json dist && shx cp README.md dist",
50
+ "test": "jasmine-ts --config=jasmine.json",
51
+ "lint": "eslint . --ext .ts"
52
+ },
53
+ "types": "index.d.ts",
54
+ "version": "5.0.0"
55
+ }