@xaendar/types 1.0.6 → 1.1.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.
- package/dist/xaendar-types.d.ts +5 -3
- package/package.json +1 -1
package/dist/xaendar-types.d.ts
CHANGED
|
@@ -13,16 +13,18 @@ export declare type AbstractConstructor<T extends object = object, Statics exten
|
|
|
13
13
|
* @template Class - The class that owns the decorated accessor.
|
|
14
14
|
* @template Value - The type of the accessor's value, the same for the original accessor and its replacement.
|
|
15
15
|
* @template Metadata - The shape of the metadata of the class (see {@link DecoratorMetadataContext}).
|
|
16
|
+
* @template SetValue - The type accepted by the replacement setter. It must include `Value`, or TypeScript rejects the
|
|
17
|
+
* decorator on the accessor.
|
|
16
18
|
*/
|
|
17
|
-
export declare type AccessorDecorator<Class extends object, Value = unknown, Metadata extends object = DecoratorMetadataObject> = (value: ClassAccessorDecoratorValue<Value>, context: DecoratorMetadataContext<ClassAccessorDecoratorContext<Class, Value>, Metadata>) => {
|
|
19
|
+
export declare type AccessorDecorator<Class extends object, Value = unknown, Metadata extends object = DecoratorMetadataObject, SetValue = Value> = (value: ClassAccessorDecoratorValue<Value>, context: DecoratorMetadataContext<ClassAccessorDecoratorContext<Class, Value>, Metadata>) => {
|
|
18
20
|
/**
|
|
19
21
|
* Replacement getter returning a value of `Value`.
|
|
20
22
|
*/
|
|
21
23
|
get?(this: Class): Value;
|
|
22
24
|
/**
|
|
23
|
-
* Replacement setter accepting a value of `
|
|
25
|
+
* Replacement setter accepting a value of `SetValue`.
|
|
24
26
|
*/
|
|
25
|
-
set?(this: Class, value:
|
|
27
|
+
set?(this: Class, value: SetValue): void;
|
|
26
28
|
/**
|
|
27
29
|
* Initializer called with the original field value; should return a `Value`.
|
|
28
30
|
*/
|