@sumaris-net/ngx-components 18.14.2 → 18.14.3
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/package.json
CHANGED
|
@@ -5,36 +5,20 @@ type ObservablePropertyDecorator<T> = <K extends PropertyKey>(target: any, prope
|
|
|
5
5
|
type StatePropertyDecorator<T> = <K extends PropertyKey>(target: any, propertyKey: K) => void;
|
|
6
6
|
/**
|
|
7
7
|
* Decorator to register the RxState property in a component
|
|
8
|
-
* Must be used once per class hierarchy
|
|
9
8
|
*/
|
|
10
9
|
export declare function RxStateRegister(): PropertyDecorator;
|
|
11
10
|
/**
|
|
12
11
|
* Decorator for RxState properties with getter/setter access
|
|
13
|
-
* Creates reactive properties that sync with RxState
|
|
14
12
|
*/
|
|
15
|
-
export declare function RxStateProperty<T = any, K extends keyof T = any, V extends T[K] = any>(statePropertyName?: string | K, projectValueReducer?: ProjectValueReducer<T, K, V>): StatePropertyDecorator<V>;
|
|
13
|
+
export declare function RxStateProperty<T extends object = any, K extends keyof T = any, V extends T[K] = any>(statePropertyName?: string | K, projectValueReducer?: ProjectValueReducer<T, K, V>): StatePropertyDecorator<V>;
|
|
16
14
|
/**
|
|
17
15
|
* Decorator for RxState observable selectors
|
|
18
|
-
* Creates observable properties that select from RxState
|
|
19
|
-
*
|
|
20
|
-
* ⚠️ IMPORTANT: La propriété décorée DOIT être typée comme Observable<T>
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```typescript
|
|
24
|
-
* @RxStateSelect()
|
|
25
|
-
* protected pmfms$: Observable<IPmfm[]>; // ✅ Correct
|
|
26
|
-
*
|
|
27
|
-
* @RxStateSelect()
|
|
28
|
-
* protected badProperty: boolean; // ❌ TypeScript Error
|
|
29
|
-
* ```
|
|
30
16
|
*/
|
|
31
17
|
export declare function RxStateSelect<T = any, R = T[keyof T]>(statePropertyName?: string | keyof T | '$', opts?: {
|
|
32
18
|
stateName?: string;
|
|
33
19
|
}): ObservablePropertyDecorator<Observable<R>>;
|
|
34
20
|
/**
|
|
35
21
|
* Utility decorator to create computed observables from state
|
|
36
|
-
*
|
|
37
|
-
* ⚠️ IMPORTANT: La propriété décorée DOIT être typée comme Observable<T>
|
|
38
22
|
*/
|
|
39
23
|
export declare function RxStateComputed<T = any, K extends keyof T = any, R = any>(dependencies: K[], computeFn?: (slice: Pick<T, K>) => R, opts?: {
|
|
40
24
|
stateName?: string;
|