@dipscope/type-manager 4.0.3 → 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 -184
  2. package/{LICENSE.txt → LICENSE.md} +201 -201
  3. package/README.md +2037 -2005
  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 -0
  8. package/core/default-value.d.ts +7 -0
  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 -42
  16. package/core/index.js +2 -2
  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 -172
  27. package/core/property-name.d.ts +6 -6
  28. package/core/property-options.d.ts +100 -92
  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 -290
  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 -298
  48. package/core/type-name.d.ts +6 -6
  49. package/core/type-options-base.d.ts +100 -92
  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 -10
  54. package/deserializable.d.ts +11 -11
  55. package/deserialized-default-value.d.ts +11 -0
  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 +2 -2
  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 -22
  64. package/index.js +2 -2
  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 +2 -2
  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 +2 -2
  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 +2 -2
  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 -0
  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 +2 -2
  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,28 +1,28 @@
1
- import { Serializer } from '../core/serializer';
2
- import { SerializerContext } from '../core/serializer-context';
3
- import { TypeLike } from '../core/type-like';
4
- /**
5
- * Uint 8 array serializer.
6
- *
7
- * @type {Uint8ArraySerializer}
8
- */
9
- export declare class Uint8ArraySerializer implements Serializer<Uint8Array> {
10
- /**
11
- * Serializes provided value.
12
- *
13
- * @param {TypeLike<Uint8Array>} x Some value.
14
- * @param {SerializerContext<Uint8Array>} serializerContext Serializer context.
15
- *
16
- * @returns {TypeLike<any>} Serialized value or undefined.
17
- */
18
- serialize(x: TypeLike<Uint8Array>, serializerContext: SerializerContext<Uint8Array>): TypeLike<any>;
19
- /**
20
- * Deserializes provided value.
21
- *
22
- * @param {TypeLike<any>} x Some value.
23
- * @param {SerializerContext<Uint8Array>} serializerContext Serializer context.
24
- *
25
- * @returns {TypeLike<Uint8Array>} Deserialized value.
26
- */
27
- deserialize(x: TypeLike<any>, serializerContext: SerializerContext<Uint8Array>): TypeLike<Uint8Array>;
28
- }
1
+ import { Serializer } from '../core/serializer';
2
+ import { SerializerContext } from '../core/serializer-context';
3
+ import { TypeLike } from '../core/type-like';
4
+ /**
5
+ * Uint 8 array serializer.
6
+ *
7
+ * @type {Uint8ArraySerializer}
8
+ */
9
+ export declare class Uint8ArraySerializer implements Serializer<Uint8Array> {
10
+ /**
11
+ * Serializes provided value.
12
+ *
13
+ * @param {TypeLike<Uint8Array>} x Some value.
14
+ * @param {SerializerContext<Uint8Array>} serializerContext Serializer context.
15
+ *
16
+ * @returns {TypeLike<any>} Serialized value or undefined.
17
+ */
18
+ serialize(x: TypeLike<Uint8Array>, serializerContext: SerializerContext<Uint8Array>): TypeLike<any>;
19
+ /**
20
+ * Deserializes provided value.
21
+ *
22
+ * @param {TypeLike<any>} x Some value.
23
+ * @param {SerializerContext<Uint8Array>} serializerContext Serializer context.
24
+ *
25
+ * @returns {TypeLike<Uint8Array>} Deserialized value.
26
+ */
27
+ deserialize(x: TypeLike<any>, serializerContext: SerializerContext<Uint8Array>): TypeLike<Uint8Array>;
28
+ }
@@ -1,28 +1,28 @@
1
- import { Serializer } from '../core/serializer';
2
- import { SerializerContext } from '../core/serializer-context';
3
- import { TypeLike } from '../core/type-like';
4
- /**
5
- * Uint 8 clamped array serializer.
6
- *
7
- * @type {Uint8ClampedArraySerializer}
8
- */
9
- export declare class Uint8ClampedArraySerializer implements Serializer<Uint8ClampedArray> {
10
- /**
11
- * Serializes provided value.
12
- *
13
- * @param {TypeLike<Uint8ClampedArray>} x Some value.
14
- * @param {SerializerContext<Uint8ClampedArray>} serializerContext Serializer context.
15
- *
16
- * @returns {TypeLike<any>} Serialized value or undefined.
17
- */
18
- serialize(x: TypeLike<Uint8ClampedArray>, serializerContext: SerializerContext<Uint8ClampedArray>): TypeLike<any>;
19
- /**
20
- * Deserializes provided value.
21
- *
22
- * @param {TypeLike<any>} x Some value.
23
- * @param {SerializerContext<Uint8ClampedArray>} serializerContext Serializer context.
24
- *
25
- * @returns {TypeLike<Uint8ClampedArray>} Deserialized value.
26
- */
27
- deserialize(x: TypeLike<any>, serializerContext: SerializerContext<Uint8ClampedArray>): TypeLike<Uint8ClampedArray>;
28
- }
1
+ import { Serializer } from '../core/serializer';
2
+ import { SerializerContext } from '../core/serializer-context';
3
+ import { TypeLike } from '../core/type-like';
4
+ /**
5
+ * Uint 8 clamped array serializer.
6
+ *
7
+ * @type {Uint8ClampedArraySerializer}
8
+ */
9
+ export declare class Uint8ClampedArraySerializer implements Serializer<Uint8ClampedArray> {
10
+ /**
11
+ * Serializes provided value.
12
+ *
13
+ * @param {TypeLike<Uint8ClampedArray>} x Some value.
14
+ * @param {SerializerContext<Uint8ClampedArray>} serializerContext Serializer context.
15
+ *
16
+ * @returns {TypeLike<any>} Serialized value or undefined.
17
+ */
18
+ serialize(x: TypeLike<Uint8ClampedArray>, serializerContext: SerializerContext<Uint8ClampedArray>): TypeLike<any>;
19
+ /**
20
+ * Deserializes provided value.
21
+ *
22
+ * @param {TypeLike<any>} x Some value.
23
+ * @param {SerializerContext<Uint8ClampedArray>} serializerContext Serializer context.
24
+ *
25
+ * @returns {TypeLike<Uint8ClampedArray>} Deserialized value.
26
+ */
27
+ deserialize(x: TypeLike<any>, serializerContext: SerializerContext<Uint8ClampedArray>): TypeLike<Uint8ClampedArray>;
28
+ }
@@ -1,12 +1,12 @@
1
- import { PropertyOptions } from './core/property-options';
2
- import { TypeOptions } from './core/type-options';
3
- /**
4
- * Type and property decorator.
5
- *
6
- * Used to define custom options for type and property.
7
- *
8
- * @param {TypeOptions&PropertyOptions} x Type and property options.
9
- *
10
- * @returns {ClassDecorator&PropertyDecorator} Class and property decorator.
11
- */
12
- export declare function TypeAndProperty<TType>(x: TypeOptions<TType> & PropertyOptions<TType>): ClassDecorator & PropertyDecorator;
1
+ import { PropertyOptions } from './core/property-options';
2
+ import { TypeOptions } from './core/type-options';
3
+ /**
4
+ * Type and property decorator.
5
+ *
6
+ * Used to define custom options for type and property.
7
+ *
8
+ * @param {TypeOptions&PropertyOptions} x Type and property options.
9
+ *
10
+ * @returns {ClassDecorator&PropertyDecorator} Class and property decorator.
11
+ */
12
+ export declare function TypeAndProperty<TType>(x: TypeOptions<TType> & PropertyOptions<TType>): ClassDecorator & PropertyDecorator;
@@ -1,24 +1,24 @@
1
- import { TypeFn } from './core';
2
- import { TypeOptions } from './core/type-options';
3
- import { TypeOptionsBase } from './core/type-options-base';
4
- /**
5
- * Type manager options.
6
- *
7
- * @type {TypeManagerOptions}
8
- */
9
- export interface TypeManagerOptions {
10
- /**
11
- * Global type options shared among all types.
12
- *
13
- * @type {Partial<TypeOptionsBase<any>>}
14
- */
15
- typeOptionsBase?: Partial<TypeOptionsBase<any>>;
16
- /**
17
- * Type options per type.
18
- *
19
- * Overrides global type options.
20
- *
21
- * @type {Map<TypeFn<any>, TypeOptions<any>>}
22
- */
23
- typeOptionsMap?: Map<TypeFn<any>, TypeOptions<any>>;
24
- }
1
+ import { TypeFn } from './core';
2
+ import { TypeOptions } from './core/type-options';
3
+ import { TypeOptionsBase } from './core/type-options-base';
4
+ /**
5
+ * Type manager options.
6
+ *
7
+ * @type {TypeManagerOptions}
8
+ */
9
+ export interface TypeManagerOptions {
10
+ /**
11
+ * Global type options shared among all types.
12
+ *
13
+ * @type {Partial<TypeOptionsBase<any>>}
14
+ */
15
+ typeOptionsBase?: Partial<TypeOptionsBase<any>>;
16
+ /**
17
+ * Type options per type.
18
+ *
19
+ * Overrides global type options.
20
+ *
21
+ * @type {Map<TypeFn<any>, TypeOptions<any>>}
22
+ */
23
+ typeOptionsMap?: Map<TypeFn<any>, TypeOptions<any>>;
24
+ }