@dipscope/type-manager 4.1.0 → 4.1.1

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 (125) hide show
  1. package/CHANGELOG.md +197 -197
  2. package/{LICENSE.txt → LICENSE.md} +201 -201
  3. package/README.md +2037 -2020
  4. package/alias.d.ts +10 -10
  5. package/core/alias.d.ts +6 -6
  6. package/core/custom-data.d.ts +6 -6
  7. package/core/default-value-resolver.d.ts +7 -7
  8. package/core/default-value.d.ts +7 -7
  9. package/core/discriminant.d.ts +8 -8
  10. package/core/discriminator.d.ts +6 -6
  11. package/core/factory.d.ts +18 -18
  12. package/core/fn.d.ts +316 -316
  13. package/core/generic-argument.d.ts +7 -7
  14. package/core/generic-metadata.d.ts +7 -7
  15. package/core/index.d.ts +44 -44
  16. package/core/index.js +1 -1
  17. package/core/index.js.map +1 -0
  18. package/core/inject-index.d.ts +6 -6
  19. package/core/inject-metadata.d.ts +72 -72
  20. package/core/inject-options.d.ts +22 -22
  21. package/core/injector.d.ts +16 -16
  22. package/core/log-level.d.ts +11 -11
  23. package/core/log.d.ts +65 -65
  24. package/core/metadata.d.ts +42 -42
  25. package/core/naming-convention.d.ts +15 -15
  26. package/core/property-metadata.d.ts +178 -178
  27. package/core/property-name.d.ts +6 -6
  28. package/core/property-options.d.ts +100 -100
  29. package/core/reference-callback.d.ts +7 -7
  30. package/core/reference-handler.d.ts +32 -32
  31. package/core/reference-key.d.ts +6 -6
  32. package/core/reference-value-initializer.d.ts +8 -8
  33. package/core/reference-value-resolver.d.ts +8 -8
  34. package/core/reference-value.d.ts +6 -6
  35. package/core/serializer-context-options.d.ts +63 -63
  36. package/core/serializer-context.d.ts +296 -296
  37. package/core/serializer.d.ts +27 -27
  38. package/core/type-abstraction.d.ts +8 -8
  39. package/core/type-argument.d.ts +9 -9
  40. package/core/type-context-entry.d.ts +36 -36
  41. package/core/type-context.d.ts +58 -58
  42. package/core/type-ctor.d.ts +6 -6
  43. package/core/type-fn.d.ts +8 -8
  44. package/core/type-like.d.ts +7 -7
  45. package/core/type-metadata-resolver.d.ts +8 -8
  46. package/core/type-metadata-symbol.d.ts +6 -6
  47. package/core/type-metadata.d.ts +304 -304
  48. package/core/type-name.d.ts +6 -6
  49. package/core/type-options-base.d.ts +100 -100
  50. package/core/type-options.d.ts +53 -53
  51. package/core/type-resolver.d.ts +7 -7
  52. package/custom-data.d.ts +11 -11
  53. package/default-value.d.ts +11 -11
  54. package/deserializable.d.ts +11 -11
  55. package/deserialized-default-value.d.ts +11 -11
  56. package/discriminant.d.ts +11 -11
  57. package/discriminator.d.ts +11 -11
  58. package/factories/index.d.ts +1 -1
  59. package/factories/index.js +1 -1
  60. package/factories/index.js.map +1 -0
  61. package/factories/type-factory.d.ts +19 -19
  62. package/factory.d.ts +11 -11
  63. package/index.d.ts +24 -24
  64. package/index.js +1 -1
  65. package/index.js.map +1 -0
  66. package/inject.d.ts +10 -10
  67. package/injectable.d.ts +10 -10
  68. package/injector.d.ts +11 -11
  69. package/injectors/index.d.ts +1 -1
  70. package/injectors/index.js +1 -1
  71. package/injectors/index.js.map +1 -0
  72. package/injectors/singleton-injector.d.ts +31 -31
  73. package/naming-convention.d.ts +11 -11
  74. package/naming-conventions/camel-case-naming-convention.d.ts +26 -26
  75. package/naming-conventions/flat-case-naming-convention.d.ts +25 -25
  76. package/naming-conventions/flat-upper-case-naming-convention.d.ts +25 -25
  77. package/naming-conventions/index.d.ts +8 -8
  78. package/naming-conventions/index.js +1 -1
  79. package/naming-conventions/index.js.map +1 -0
  80. package/naming-conventions/kebab-case-naming-convention.d.ts +26 -26
  81. package/naming-conventions/kebab-upper-case-naming-convention.d.ts +26 -26
  82. package/naming-conventions/pascal-case-naming-convention.d.ts +26 -26
  83. package/naming-conventions/snake-case-naming-convention.d.ts +26 -26
  84. package/naming-conventions/snake-upper-case-naming-convention.d.ts +26 -26
  85. package/package.json +48 -48
  86. package/preserve-discriminator.d.ts +10 -10
  87. package/property.d.ts +12 -12
  88. package/reference-handler.d.ts +11 -11
  89. package/reference-handlers/direct-reference-handler.d.ts +33 -33
  90. package/reference-handlers/index.d.ts +3 -3
  91. package/reference-handlers/index.js +1 -1
  92. package/reference-handlers/index.js.map +1 -0
  93. package/reference-handlers/lead-reference-handler.d.ts +34 -34
  94. package/reference-handlers/path-reference-handler.d.ts +56 -56
  95. package/serializable.d.ts +11 -11
  96. package/serialized-default-value.d.ts +11 -11
  97. package/serializer.d.ts +11 -11
  98. package/serializers/array-buffer-serializer.d.ts +28 -28
  99. package/serializers/array-serializer.d.ts +28 -28
  100. package/serializers/boolean-serializer.d.ts +37 -37
  101. package/serializers/data-view-serializer.d.ts +28 -28
  102. package/serializers/date-serializer.d.ts +28 -28
  103. package/serializers/float-32-array-serializer.d.ts +28 -28
  104. package/serializers/float-64-array-serializer.d.ts +28 -28
  105. package/serializers/index.d.ts +19 -19
  106. package/serializers/index.js +1 -1
  107. package/serializers/index.js.map +1 -0
  108. package/serializers/int-16-array-serializer.d.ts +28 -28
  109. package/serializers/int-32-array-serializer.d.ts +28 -28
  110. package/serializers/int-8-array-serializer.d.ts +28 -28
  111. package/serializers/map-serializer.d.ts +28 -28
  112. package/serializers/number-serializer.d.ts +37 -37
  113. package/serializers/set-serializer.d.ts +28 -28
  114. package/serializers/string-serializer.d.ts +37 -37
  115. package/serializers/type-serializer.d.ts +28 -28
  116. package/serializers/uint-16-array-serializer.d.ts +28 -28
  117. package/serializers/uint-32-array-serializer.d.ts +28 -28
  118. package/serializers/uint-8-array-serializer.d.ts +28 -28
  119. package/serializers/uint-8-clamped-array-serializer.d.ts +28 -28
  120. package/type-and-property.d.ts +12 -12
  121. package/type-manager-options.d.ts +24 -24
  122. package/type-manager.d.ts +331 -331
  123. package/type.d.ts +9 -9
  124. package/use-default-value.d.ts +10 -10
  125. package/use-implicit-conversion.d.ts +10 -10
@@ -1,9 +1,9 @@
1
- import { Alias } from './alias';
2
- import { TypeFn } from './type-fn';
3
- import { TypeResolver } from './type-resolver';
4
- /**
5
- * Type argument represents a data which can be passed to define a certain type.
6
- *
7
- * @type {TypeArgument<TType>}
8
- */
9
- export declare type TypeArgument<TType> = Alias | TypeFn<TType> | TypeResolver<TType>;
1
+ import { Alias } from './alias';
2
+ import { TypeFn } from './type-fn';
3
+ import { TypeResolver } from './type-resolver';
4
+ /**
5
+ * Type argument represents a data which can be passed to define a certain type.
6
+ *
7
+ * @type {TypeArgument<TType>}
8
+ */
9
+ export declare type TypeArgument<TType> = Alias | TypeFn<TType> | TypeResolver<TType>;
@@ -1,36 +1,36 @@
1
- import { PropertyMetadata } from './property-metadata';
2
- /**
3
- * Represents a data entry defined within a scope of a type.
4
- *
5
- * @type {TypeContextEntry<TDeclaringType, TType>}
6
- */
7
- export declare class TypeContextEntry<TDeclaringType, TType> {
8
- /**
9
- * Unique key.
10
- *
11
- * @type {string}
12
- */
13
- readonly key: string;
14
- /**
15
- * Value behind a key.
16
- *
17
- * If property metadata is defined then this is deserialized value. Original otherwise.
18
- *
19
- * @type {any}
20
- */
21
- readonly value: any;
22
- /**
23
- * Property metadata behind a key.
24
- *
25
- * @type {PropertyMetadata<TDeclaringType, TType>}
26
- */
27
- readonly propertyMetadata?: PropertyMetadata<TDeclaringType, TType>;
28
- /**
29
- * Constructor.
30
- *
31
- * @param {string} key Unique key.
32
- * @param {any} value Value behind a key.
33
- * @param {PropertyMetadata<TDeclaringType, TType>} propertyMetadata Property metadata behind a key.
34
- */
35
- constructor(key: string, value: any, propertyMetadata?: PropertyMetadata<TDeclaringType, TType>);
36
- }
1
+ import { PropertyMetadata } from './property-metadata';
2
+ /**
3
+ * Represents a data entry defined within a scope of a type.
4
+ *
5
+ * @type {TypeContextEntry<TDeclaringType, TType>}
6
+ */
7
+ export declare class TypeContextEntry<TDeclaringType, TType> {
8
+ /**
9
+ * Unique key.
10
+ *
11
+ * @type {string}
12
+ */
13
+ readonly key: string;
14
+ /**
15
+ * Value behind a key.
16
+ *
17
+ * If property metadata is defined then this is deserialized value. Original otherwise.
18
+ *
19
+ * @type {any}
20
+ */
21
+ readonly value: any;
22
+ /**
23
+ * Property metadata behind a key.
24
+ *
25
+ * @type {PropertyMetadata<TDeclaringType, TType>}
26
+ */
27
+ readonly propertyMetadata?: PropertyMetadata<TDeclaringType, TType>;
28
+ /**
29
+ * Constructor.
30
+ *
31
+ * @param {string} key Unique key.
32
+ * @param {any} value Value behind a key.
33
+ * @param {PropertyMetadata<TDeclaringType, TType>} propertyMetadata Property metadata behind a key.
34
+ */
35
+ constructor(key: string, value: any, propertyMetadata?: PropertyMetadata<TDeclaringType, TType>);
36
+ }
@@ -1,58 +1,58 @@
1
- import { TypeContextEntry } from './type-context-entry';
2
- import { TypeMetadata } from './type-metadata';
3
- /**
4
- * Type context class to encapsulate type values before building an object.
5
- *
6
- * @type {TypeContext<TType>}
7
- */
8
- export declare class TypeContext<TType> {
9
- /**
10
- * Type metadata.
11
- *
12
- * @type {TypeMetadata<TType>}
13
- */
14
- readonly typeMetadata: TypeMetadata<TType>;
15
- /**
16
- * Type context entry map.
17
- *
18
- * @type {Map<string, TypeContextEntry<TType, any>>}
19
- */
20
- readonly typeContextEntryMap: Map<string, TypeContextEntry<TType, any>>;
21
- /**
22
- * Constructor.
23
- *
24
- * @param {TypeMetadata<TType>} typeMetadata Type metadata.
25
- */
26
- constructor(typeMetadata: TypeMetadata<TType>);
27
- /**
28
- * Sets value for key.
29
- *
30
- * @param {string} key Key.
31
- * @param {TypeContextEntry<TType, any>} value Value.
32
- *
33
- * @returns {TypeContext<TType>} Current type context.
34
- */
35
- set(key: string, value: TypeContextEntry<TType, any>): TypeContext<TType>;
36
- /**
37
- * Gets value by key.
38
- *
39
- * @param {string} key Key.
40
- *
41
- * @returns {TypeContextEntry<TType, any>} Type context entry or undefined.
42
- */
43
- get(key: string): TypeContextEntry<TType, any> | undefined;
44
- /**
45
- * Checks if type context has a key.
46
- *
47
- * @param {string} key Key.
48
- *
49
- * @returns {boolean} True when type context has a key. False otherwise.
50
- */
51
- has(key: string): boolean;
52
- /**
53
- * Gets iterable for values inside the context.
54
- *
55
- * @returns {IterableIterator<TypeContextEntry<TType, any>>} Iterable for values inside the context.
56
- */
57
- values(): IterableIterator<TypeContextEntry<TType, any>>;
58
- }
1
+ import { TypeContextEntry } from './type-context-entry';
2
+ import { TypeMetadata } from './type-metadata';
3
+ /**
4
+ * Type context class to encapsulate type values before building an object.
5
+ *
6
+ * @type {TypeContext<TType>}
7
+ */
8
+ export declare class TypeContext<TType> {
9
+ /**
10
+ * Type metadata.
11
+ *
12
+ * @type {TypeMetadata<TType>}
13
+ */
14
+ readonly typeMetadata: TypeMetadata<TType>;
15
+ /**
16
+ * Type context entry map.
17
+ *
18
+ * @type {Map<string, TypeContextEntry<TType, any>>}
19
+ */
20
+ readonly typeContextEntryMap: Map<string, TypeContextEntry<TType, any>>;
21
+ /**
22
+ * Constructor.
23
+ *
24
+ * @param {TypeMetadata<TType>} typeMetadata Type metadata.
25
+ */
26
+ constructor(typeMetadata: TypeMetadata<TType>);
27
+ /**
28
+ * Sets value for key.
29
+ *
30
+ * @param {string} key Key.
31
+ * @param {TypeContextEntry<TType, any>} value Value.
32
+ *
33
+ * @returns {TypeContext<TType>} Current type context.
34
+ */
35
+ set(key: string, value: TypeContextEntry<TType, any>): TypeContext<TType>;
36
+ /**
37
+ * Gets value by key.
38
+ *
39
+ * @param {string} key Key.
40
+ *
41
+ * @returns {TypeContextEntry<TType, any>} Type context entry or undefined.
42
+ */
43
+ get(key: string): TypeContextEntry<TType, any> | undefined;
44
+ /**
45
+ * Checks if type context has a key.
46
+ *
47
+ * @param {string} key Key.
48
+ *
49
+ * @returns {boolean} True when type context has a key. False otherwise.
50
+ */
51
+ has(key: string): boolean;
52
+ /**
53
+ * Gets iterable for values inside the context.
54
+ *
55
+ * @returns {IterableIterator<TypeContextEntry<TType, any>>} Iterable for values inside the context.
56
+ */
57
+ values(): IterableIterator<TypeContextEntry<TType, any>>;
58
+ }
@@ -1,6 +1,6 @@
1
- /**
2
- * Type constructor.
3
- *
4
- * @type {TypeCtor<TType>}
5
- */
6
- export declare type TypeCtor<TType> = new (...args: Array<any>) => TType;
1
+ /**
2
+ * Type constructor.
3
+ *
4
+ * @type {TypeCtor<TType>}
5
+ */
6
+ export declare type TypeCtor<TType> = new (...args: Array<any>) => TType;
package/core/type-fn.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { TypeAbstraction } from './type-abstraction';
2
- import { TypeCtor } from './type-ctor';
3
- /**
4
- * Type function.
5
- *
6
- * @type {TypeFn<TType>}
7
- */
8
- export declare type TypeFn<TType> = TypeCtor<TType> | TypeAbstraction<TType>;
1
+ import { TypeAbstraction } from './type-abstraction';
2
+ import { TypeCtor } from './type-ctor';
3
+ /**
4
+ * Type function.
5
+ *
6
+ * @type {TypeFn<TType>}
7
+ */
8
+ export declare type TypeFn<TType> = TypeCtor<TType> | TypeAbstraction<TType>;
@@ -1,7 +1,7 @@
1
- /**
2
- * Type to describe type including null and undefined variations of it. Used as a
3
- * generic type for serializer input and output.
4
- *
5
- * @type {TypeLike<TType>}
6
- */
7
- export declare type TypeLike<TType> = TType | null | undefined;
1
+ /**
2
+ * Type to describe type including null and undefined variations of it. Used as a
3
+ * generic type for serializer input and output.
4
+ *
5
+ * @type {TypeLike<TType>}
6
+ */
7
+ export declare type TypeLike<TType> = TType | null | undefined;
@@ -1,8 +1,8 @@
1
- import { TypeArgument } from './type-argument';
2
- import { TypeMetadata } from './type-metadata';
3
- /**
4
- * Type metadata resolver used to resolve a certain type metadata by provided type argument.
5
- *
6
- * @type {TypeMetadataResolver<TType>}
7
- */
8
- export declare type TypeMetadataResolver<TType> = (typeArgument: TypeArgument<TType>) => TypeMetadata<TType>;
1
+ import { TypeArgument } from './type-argument';
2
+ import { TypeMetadata } from './type-metadata';
3
+ /**
4
+ * Type metadata resolver used to resolve a certain type metadata by provided type argument.
5
+ *
6
+ * @type {TypeMetadataResolver<TType>}
7
+ */
8
+ export declare type TypeMetadataResolver<TType> = (typeArgument: TypeArgument<TType>) => TypeMetadata<TType>;
@@ -1,6 +1,6 @@
1
- /**
2
- * Unique symbol used to store type metadata.
3
- *
4
- * @type {unique symbol}
5
- */
6
- export declare const typeMetadataSymbol: unique symbol;
1
+ /**
2
+ * Unique symbol used to store type metadata.
3
+ *
4
+ * @type {unique symbol}
5
+ */
6
+ export declare const typeMetadataSymbol: unique symbol;