quetch 0.18.1 → 0.18.2
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.
|
@@ -2,7 +2,11 @@ import type { Any } from "./Any";
|
|
|
2
2
|
import type { FieldFiltered } from "./FieldFiltered";
|
|
3
3
|
import type { Value } from "./Value";
|
|
4
4
|
/**
|
|
5
|
-
* Checks if a given array field matches a given array value according to a given operator
|
|
5
|
+
* Checks if a given array field matches a given array value according to a given operator:
|
|
6
|
+
*
|
|
7
|
+
* - `equal` matches the exact content of the array.
|
|
8
|
+
* - `include` requires every value to be present in the array.
|
|
9
|
+
* - `intersect` requires at least one item of the value to be present in the array.
|
|
6
10
|
*/
|
|
7
11
|
export type FilterArray<T extends object, P = Any> = {
|
|
8
12
|
operator: "equal" | "include" | "intersect";
|
package/dist/types/Path.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Increment } from "./Increment";
|
|
2
|
-
export type Path<T, D = 0> = D extends
|
|
2
|
+
export type Path<T, D = 0> = D extends 2 ? never : T extends Array<infer P> ? readonly [number] | readonly [number, ...Path<P, Increment<D>>] : T extends object ? {
|
|
3
3
|
[K in keyof T]-?: [K] | [K, ...Path<T[K], Increment<D>>];
|
|
4
4
|
}[keyof T] : never;
|
package/lib/types/FilterArray.ts
CHANGED
|
@@ -3,7 +3,11 @@ import type { FieldFiltered } from "./FieldFiltered";
|
|
|
3
3
|
import type { Value } from "./Value";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* Checks if a given array field matches a given array value according to a given operator
|
|
6
|
+
* Checks if a given array field matches a given array value according to a given operator:
|
|
7
|
+
*
|
|
8
|
+
* - `equal` matches the exact content of the array.
|
|
9
|
+
* - `include` requires every value to be present in the array.
|
|
10
|
+
* - `intersect` requires at least one item of the value to be present in the array.
|
|
7
11
|
*/
|
|
8
12
|
export type FilterArray<T extends object, P = Any> = {
|
|
9
13
|
operator: "equal" | "include" | "intersect";
|
package/lib/types/Path.ts
CHANGED