shelving 1.48.0 → 1.48.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.
- package/package.json +1 -1
- package/query/Filters.d.ts +2 -2
- package/query/Query.d.ts +2 -2
- package/query/types.d.ts +5 -5
package/package.json
CHANGED
package/query/Filters.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ export declare class Filters<T extends Data> extends Rules<T, Filter<T>> impleme
|
|
|
9
9
|
filter(props: FilterProps<T>): this;
|
|
10
10
|
filter(key: "id" | "!id" | "id>" | "id>=" | "id<" | "id<=", value: string): this;
|
|
11
11
|
filter(key: "id" | "!id", value: ImmutableArray<string>): this;
|
|
12
|
-
filter<K extends Key<T>>(key: K | `!${K}` | `${K}>` | `${K}>=` | `${K}<` | `${K}<=`, value: T[K]): this;
|
|
13
|
-
filter<K extends Key<T>>(key: K | `!${K}`, value: ImmutableArray<string>): this;
|
|
12
|
+
filter<K extends Key<T>>(key: `${K}` | `!${K}` | `${K}>` | `${K}>=` | `${K}<` | `${K}<=`, value: T[K]): this;
|
|
13
|
+
filter<K extends Key<T>>(key: `${K}` | `!${K}`, value: ImmutableArray<string>): this;
|
|
14
14
|
filter<K extends Key<T>>(key: `${K}[]`, value: T[K] extends ImmutableArray ? ArrayType<T[K]> : never): this;
|
|
15
15
|
match(entry: Entry<T>): boolean;
|
|
16
16
|
transform(iterable: Entries<T>): Entries<T>;
|
package/query/Query.d.ts
CHANGED
|
@@ -14,8 +14,8 @@ export declare class Query<T extends Data> extends Rule<T> implements Queryable<
|
|
|
14
14
|
filter(props: FilterProps<T>): this;
|
|
15
15
|
filter(key: "id" | "!id" | "id>" | "id>=" | "id<" | "id<=", value: string): this;
|
|
16
16
|
filter(key: "id" | "!id", value: ImmutableArray<string>): this;
|
|
17
|
-
filter<K extends Key<T>>(key: K | `!${K}` | `${K}>` | `${K}>=` | `${K}<` | `${K}<=`, value: T[K]): this;
|
|
18
|
-
filter<K extends Key<T>>(key: K | `!${K}`, value: ImmutableArray<T[K]>): this;
|
|
17
|
+
filter<K extends Key<T>>(key: `${K}` | `!${K}` | `${K}>` | `${K}>=` | `${K}<` | `${K}<=`, value: T[K]): this;
|
|
18
|
+
filter<K extends Key<T>>(key: `${K}` | `!${K}`, value: ImmutableArray<T[K]>): this;
|
|
19
19
|
filter<K extends Key<T>>(key: `${K}[]`, value: T[K] extends ImmutableArray ? ArrayType<T[K]> : never): this;
|
|
20
20
|
get unfilter(): this;
|
|
21
21
|
match(entry: Entry<T>): boolean;
|
package/query/types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Data, Key, Matchable, Entry, Rankable, ImmutableArray, ArrayType }
|
|
|
2
2
|
/** Possible operator references. */
|
|
3
3
|
export declare type FilterOperator = "IS" | "NOT" | "IN" | "OUT" | "CONTAINS" | "LT" | "LTE" | "GT" | "GTE";
|
|
4
4
|
/** Format that allows filters to be specified as a string, e.g. `!name` means `name is not` and `age>` means `age is more than` and `tags[]` means `tags array contains` */
|
|
5
|
-
export declare type FilterKey<T extends Data> = "id" | "!id" | "id>" | "id>=" | "id<" | "id<=" | Key<T> | `!${Key<T>}` | `${Key<T>}[]` | `${Key<T>}<` | `${Key<T>}<=` | `${Key<T>}>` | `${Key<T>}>=`;
|
|
5
|
+
export declare type FilterKey<T extends Data> = "id" | "!id" | "id>" | "id>=" | "id<" | "id<=" | Key<T> | `${Key<T>}` | `!${Key<T>}` | `${Key<T>}[]` | `${Key<T>}<` | `${Key<T>}<=` | `${Key<T>}>` | `${Key<T>}>=`;
|
|
6
6
|
/** Format that allows multiple filters to be specified as a plain object. */
|
|
7
7
|
export declare type FilterProps<T extends Data> = {
|
|
8
8
|
"id"?: string | ImmutableArray<string>;
|
|
@@ -12,7 +12,7 @@ export declare type FilterProps<T extends Data> = {
|
|
|
12
12
|
"id<"?: string;
|
|
13
13
|
"id<="?: string;
|
|
14
14
|
} & {
|
|
15
|
-
[K in Key<T> as K | `!${K}`]?: T[K] | ImmutableArray<T[K]>;
|
|
15
|
+
[K in Key<T> as `${K}` | `!${K}`]?: T[K] | ImmutableArray<T[K]>;
|
|
16
16
|
} & {
|
|
17
17
|
[K in Key<T> as `${K}[]`]?: T[K] extends ImmutableArray ? ArrayType<T[K]> : never;
|
|
18
18
|
} & {
|
|
@@ -27,14 +27,14 @@ export interface Filterable<T extends Data> extends Matchable<Entry<T>, void> {
|
|
|
27
27
|
filter(props: FilterProps<T>): this;
|
|
28
28
|
filter(key: "id" | "!id" | "id>" | "id>=" | "id<" | "id<=", value: string): this;
|
|
29
29
|
filter(key: "id" | "!id", value: ImmutableArray<string>): this;
|
|
30
|
-
filter<K extends Key<T>>(key: K | `!${K}` | `${K}>` | `${K}>=` | `${K}<` | `${K}<=`, value: T[K]): this;
|
|
31
|
-
filter<K extends Key<T>>(key: K | `!${K}`, value: ImmutableArray<string>): this;
|
|
30
|
+
filter<K extends Key<T>>(key: `${K}` | `!${K}` | `${K}>` | `${K}>=` | `${K}<` | `${K}<=`, value: T[K]): this;
|
|
31
|
+
filter<K extends Key<T>>(key: `${K}` | `!${K}`, value: ImmutableArray<string>): this;
|
|
32
32
|
filter<K extends Key<T>>(key: `${K}[]`, value: T[K] extends ImmutableArray ? ArrayType<T[K]> : never): this;
|
|
33
33
|
/** Match an entry against the filters specified for this object. */
|
|
34
34
|
match(entry: Entry<T>): boolean;
|
|
35
35
|
}
|
|
36
36
|
/** Format that allows sorts to be set as a plain string, e.g. `name` sorts by name in ascending order and `!date` sorts by date in descending order. */
|
|
37
|
-
export declare type SortKey<T extends Data> = "id" | "!id" | Key<T> | `!${Key<T>}`;
|
|
37
|
+
export declare type SortKey<T extends Data> = "id" | "!id" | Key<T> | `${Key<T>}` | `!${Key<T>}`;
|
|
38
38
|
/** One or more sort keys. */
|
|
39
39
|
export declare type SortKeys<T extends Data> = SortKey<T> | ImmutableArray<SortKey<T>>;
|
|
40
40
|
/** Possible operator references. */
|