@ngxs/store 3.7.3-dev.master-740d0c2 → 3.7.3-dev.master-5175b98
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/bundles/ngxs-store-operators.umd.js +13 -12
- package/bundles/ngxs-store-operators.umd.js.map +1 -1
- package/bundles/ngxs-store-operators.umd.min.js +1 -1
- package/bundles/ngxs-store-operators.umd.min.js.map +1 -1
- package/bundles/ngxs-store.umd.js +5 -4
- package/bundles/ngxs-store.umd.js.map +1 -1
- package/bundles/ngxs-store.umd.min.js +1 -1
- package/bundles/ngxs-store.umd.min.js.map +1 -1
- package/esm2015/operators/append.js +3 -3
- package/esm2015/operators/compose.js +1 -1
- package/esm2015/operators/iif.js +1 -1
- package/esm2015/operators/index.js +1 -1
- package/esm2015/operators/insert-item.js +3 -3
- package/esm2015/operators/patch.js +4 -5
- package/esm2015/operators/update-item.js +7 -5
- package/esm2015/operators/utils.js +1 -1
- package/esm2015/src/decorators/select/select.js +6 -5
- package/esm5/operators/append.js +3 -3
- package/esm5/operators/compose.js +1 -1
- package/esm5/operators/iif.js +1 -1
- package/esm5/operators/index.js +1 -1
- package/esm5/operators/insert-item.js +3 -3
- package/esm5/operators/patch.js +4 -5
- package/esm5/operators/update-item.js +7 -5
- package/esm5/operators/utils.js +1 -1
- package/esm5/src/decorators/select/select.js +6 -5
- package/fesm2015/ngxs-store-operators.js +13 -12
- package/fesm2015/ngxs-store-operators.js.map +1 -1
- package/fesm2015/ngxs-store.js +5 -4
- package/fesm2015/ngxs-store.js.map +1 -1
- package/fesm5/ngxs-store-operators.js +13 -12
- package/fesm5/ngxs-store-operators.js.map +1 -1
- package/fesm5/ngxs-store.js +5 -4
- package/fesm5/ngxs-store.js.map +1 -1
- package/operators/append.d.ts +2 -2
- package/operators/compose.d.ts +2 -1
- package/operators/iif.d.ts +2 -2
- package/operators/index.d.ts +1 -1
- package/operators/insert-item.d.ts +2 -2
- package/operators/ngxs-store-operators.metadata.json +1 -1
- package/operators/patch.d.ts +2 -6
- package/operators/update-item.d.ts +2 -2
- package/operators/utils.d.ts +2 -1
- package/package.json +1 -1
package/operators/append.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StateOperator } from '@ngxs/store';
|
|
2
|
-
import { RepairType } from './utils';
|
|
2
|
+
import { RepairType, NoInfer } from './utils';
|
|
3
3
|
/**
|
|
4
4
|
* @param items - Specific items to append to the end of an array
|
|
5
5
|
*/
|
|
6
|
-
export declare function append<T>(items: T[]): StateOperator<RepairType<T>[]>;
|
|
6
|
+
export declare function append<T>(items: NoInfer<T>[]): StateOperator<RepairType<T>[]>;
|
package/operators/compose.d.ts
CHANGED
package/operators/iif.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StateOperator } from '@ngxs/store';
|
|
2
|
-
import { RepairType } from './utils';
|
|
2
|
+
import { RepairType, NoInfer } from './utils';
|
|
3
3
|
import { Predicate } from './internals';
|
|
4
4
|
/**
|
|
5
5
|
* @param condition - Condition can be a plain boolean value or a function,
|
|
@@ -8,4 +8,4 @@ import { Predicate } from './internals';
|
|
|
8
8
|
* @param trueOperatorOrValue - Any value or a state operator
|
|
9
9
|
* @param elseOperatorOrValue - Any value or a state operator
|
|
10
10
|
*/
|
|
11
|
-
export declare function iif<T>(condition: Predicate<T
|
|
11
|
+
export declare function iif<T>(condition: NoInfer<Predicate<T>> | boolean, trueOperatorOrValue: NoInfer<StateOperator<T>> | T, elseOperatorOrValue?: NoInfer<StateOperator<T>> | T): StateOperator<RepairType<T>>;
|
package/operators/index.d.ts
CHANGED
|
@@ -8,6 +8,6 @@ export { compose } from './compose';
|
|
|
8
8
|
export { iif } from './iif';
|
|
9
9
|
export { insertItem } from './insert-item';
|
|
10
10
|
export { patch } from './patch';
|
|
11
|
-
export { isStateOperator } from './utils';
|
|
11
|
+
export { isStateOperator, NoInfer } from './utils';
|
|
12
12
|
export { updateItem } from './update-item';
|
|
13
13
|
export { removeItem } from './remove-item';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StateOperator } from '@ngxs/store';
|
|
2
|
-
import { RepairType } from './utils';
|
|
2
|
+
import { RepairType, NoInfer } from './utils';
|
|
3
3
|
/**
|
|
4
4
|
* @param value - Value to insert
|
|
5
5
|
* @param [beforePosition] - Specified index to insert value before, optional
|
|
6
6
|
*/
|
|
7
|
-
export declare function insertItem<T>(value: T
|
|
7
|
+
export declare function insertItem<T>(value: NoInfer<T>, beforePosition?: number): StateOperator<RepairType<T>[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"append":{"__symbolic":"function","parameters":["items"],"value":{"__symbolic":"error","message":"Lambda not supported","line":7,"character":9,"module":"./append"}},"compose":{"__symbolic":"function","parameters":["operators"],"value":{"__symbolic":"error","message":"Lambda not supported","line":
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"append":{"__symbolic":"function","parameters":["items"],"value":{"__symbolic":"error","message":"Lambda not supported","line":7,"character":9,"module":"./append"}},"compose":{"__symbolic":"function","parameters":["operators"],"value":{"__symbolic":"error","message":"Lambda not supported","line":4,"character":9,"module":"./compose"}},"iif":{"__symbolic":"function","parameters":["condition","trueOperatorOrValue","elseOperatorOrValue"],"value":{"__symbolic":"error","message":"Lambda not supported","line":38,"character":9,"module":"./iif"}},"insertItem":{"__symbolic":"function","parameters":["value","beforePosition"],"value":{"__symbolic":"error","message":"Lambda not supported","line":11,"character":9,"module":"./insert-item"}},"patch":{"__symbolic":"function","parameters":["patchObject"],"value":{"__symbolic":"error","message":"Lambda not supported","line":10,"character":10,"module":"./patch"}},"isStateOperator":{"__symbolic":"function","parameters":["value"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":5,"character":9,"module":"./utils"},"right":"function"}},"NoInfer":{"__symbolic":"interface"},"updateItem":{"__symbolic":"function","parameters":["selector","operatorOrValue"],"value":{"__symbolic":"error","message":"Lambda not supported","line":22,"character":9,"module":"./update-item"}},"removeItem":{"__symbolic":"function","parameters":["selector"],"value":{"__symbolic":"error","message":"Lambda not supported","line":10,"character":9,"module":"./remove-item"}}},"origins":{"append":"./append","compose":"./compose","iif":"./iif","insertItem":"./insert-item","patch":"./patch","isStateOperator":"./utils","NoInfer":"./utils","updateItem":"./update-item","removeItem":"./remove-item"},"importAs":"@ngxs/store/operators"}
|
package/operators/patch.d.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { StateOperator } from '@ngxs/store';
|
|
2
|
+
import { NoInfer } from './utils';
|
|
2
3
|
export declare type PatchSpec<T> = {
|
|
3
4
|
[P in keyof T]?: T[P] | StateOperator<NonNullable<T[P]>>;
|
|
4
5
|
};
|
|
5
|
-
declare
|
|
6
|
-
readonly [P in keyof T]?: T[P] extends (...args: any[]) => infer R ? R : T[P];
|
|
7
|
-
};
|
|
8
|
-
declare type PatchOperator<T> = <U extends PatchValues<T>>(existing: Readonly<U>) => U;
|
|
9
|
-
export declare function patch<T>(patchObject: PatchSpec<T>): PatchOperator<T>;
|
|
10
|
-
export {};
|
|
6
|
+
export declare function patch<T>(patchObject: NoInfer<PatchSpec<T>>): StateOperator<NonNullable<T>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StateOperator } from '@ngxs/store';
|
|
2
|
-
import { RepairType } from './utils';
|
|
2
|
+
import { RepairType, NoInfer } from './utils';
|
|
3
3
|
import { Predicate } from './internals';
|
|
4
4
|
/**
|
|
5
5
|
* @param selector - Index of item in the array or a predicate function
|
|
@@ -7,4 +7,4 @@ import { Predicate } from './internals';
|
|
|
7
7
|
* @param operatorOrValue - New value under the `selector` index or a
|
|
8
8
|
* function that can be applied to an existing value
|
|
9
9
|
*/
|
|
10
|
-
export declare function updateItem<T>(selector: number | Predicate<T
|
|
10
|
+
export declare function updateItem<T>(selector: number | NoInfer<Predicate<T>>, operatorOrValue: NoInfer<T> | NoInfer<StateOperator<T>>): StateOperator<RepairType<T>[]>;
|
package/operators/utils.d.ts
CHANGED
|
@@ -6,4 +6,5 @@ export declare function isPredicate<T>(value: Predicate<T> | boolean | number):
|
|
|
6
6
|
export declare function isNumber(value: any): value is number;
|
|
7
7
|
export declare function invalidIndex(index: number): boolean;
|
|
8
8
|
export declare function isNil<T>(value: T | null | undefined): value is null | undefined;
|
|
9
|
-
export declare type RepairType<T> = T extends true ? boolean :
|
|
9
|
+
export declare type RepairType<T> = T extends true ? boolean : T extends false ? boolean : T;
|
|
10
|
+
export declare type NoInfer<T> = T extends infer S ? S : never;
|
package/package.json
CHANGED