quetch 0.33.0 → 0.33.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.
- package/dist/constants/COLLATOR_DEFAULT.d.ts +1 -0
- package/dist/constants/COLLATOR_DEFAULT.js +5 -0
- package/dist/constants/COLLATOR_DEFAULT.js.map +1 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/constants.js.map +1 -1
- package/dist/tools/comparatorFieldValues.d.ts +1 -1
- package/dist/tools/comparatorFieldValues.js +24 -3
- package/dist/tools/comparatorFieldValues.js.map +1 -1
- package/dist/types/CombineUnion.d.ts +1 -1
- package/dist/types/Context.d.ts +2 -2
- package/dist/types/FieldFiltered.d.ts +3 -0
- package/dist/types/FieldKey.d.ts +4 -1
- package/dist/types/NormalizedPathFieldSettings.d.ts +4 -0
- package/dist/types/Path.d.ts +4 -1
- package/dist/types/PathFiltered.d.ts +3 -0
- package/dist/types/Primitive.d.ts +3 -0
- package/dist/types/Result.d.ts +2 -2
- package/doc/README.md +1 -0
- package/doc/classes/RequestError.md +5 -5
- package/doc/functions/aggregate.md +1 -1
- package/doc/functions/branch.md +1 -1
- package/doc/functions/cache.md +1 -1
- package/doc/functions/combine.md +1 -1
- package/doc/functions/comparatorFieldValues.md +1 -1
- package/doc/functions/cork.md +1 -1
- package/doc/functions/defineCheckQuery.md +1 -1
- package/doc/functions/defineCustomFetch.md +1 -1
- package/doc/functions/defineGenericFetch.md +1 -1
- package/doc/functions/escapeRegex.md +1 -1
- package/doc/functions/fetchExternal.md +1 -1
- package/doc/functions/fetchLocal.md +1 -1
- package/doc/functions/fieldListFromFilter.md +1 -1
- package/doc/functions/fieldListUnion.md +1 -1
- package/doc/functions/filterChildren.md +1 -1
- package/doc/functions/filterFromValue.md +1 -1
- package/doc/functions/get.md +1 -1
- package/doc/functions/groupFilters.md +1 -1
- package/doc/functions/identity.md +1 -1
- package/doc/functions/intrinsicFilter.md +1 -1
- package/doc/functions/isFilterGroup.md +1 -1
- package/doc/functions/log.md +1 -1
- package/doc/functions/normalizeOrder.md +1 -1
- package/doc/functions/queryItemList.md +1 -1
- package/doc/functions/querySettings.md +1 -1
- package/doc/functions/retry.md +1 -1
- package/doc/functions/reverseOrder.md +1 -1
- package/doc/functions/sameField.md +1 -1
- package/doc/functions/sortItemList.md +1 -1
- package/doc/functions/splitPath.md +2 -2
- package/doc/functions/testFilter.md +1 -1
- package/doc/functions/transformerFilterChildren.md +1 -1
- package/doc/interfaces/CustomFetch.md +1 -1
- package/doc/type-aliases/AggregateFunction.md +1 -1
- package/doc/type-aliases/AggregateFunctionOperator.md +1 -1
- package/doc/type-aliases/CombineUnion.md +2 -2
- package/doc/type-aliases/Context.md +2 -2
- package/doc/type-aliases/CustomFieldAggregateMap.md +1 -1
- package/doc/type-aliases/CustomFieldMap.md +1 -1
- package/doc/type-aliases/Decrement.md +1 -1
- package/doc/type-aliases/DepthLimit.md +1 -1
- package/doc/type-aliases/Field.md +1 -1
- package/doc/type-aliases/FieldFiltered.md +3 -1
- package/doc/type-aliases/FieldFunction.md +1 -1
- package/doc/type-aliases/FieldFunctionCustom.md +1 -1
- package/doc/type-aliases/FieldFunctionFormatDate.md +1 -1
- package/doc/type-aliases/FieldFunctionReturn.md +1 -1
- package/doc/type-aliases/FieldKey.md +4 -2
- package/doc/type-aliases/FieldMap.md +1 -1
- package/doc/type-aliases/Filter.md +1 -1
- package/doc/type-aliases/FilterArray.md +1 -1
- package/doc/type-aliases/FilterBoolean.md +1 -1
- package/doc/type-aliases/FilterChildren.md +1 -1
- package/doc/type-aliases/FilterCustom.md +1 -1
- package/doc/type-aliases/FilterField.md +1 -1
- package/doc/type-aliases/FilterGroup.md +1 -1
- package/doc/type-aliases/FilterNumber.md +1 -1
- package/doc/type-aliases/FilterOperator.md +1 -1
- package/doc/type-aliases/FilterString.md +1 -1
- package/doc/type-aliases/FilterStringIntersect.md +1 -1
- package/doc/type-aliases/FilterStringMatch.md +1 -1
- package/doc/type-aliases/FilterWithField.md +1 -1
- package/doc/type-aliases/Get.md +1 -1
- package/doc/type-aliases/Group.md +1 -1
- package/doc/type-aliases/Handler.md +1 -1
- package/doc/type-aliases/Immutable.md +1 -1
- package/doc/type-aliases/InjectCustomFields.md +1 -1
- package/doc/type-aliases/IntersectUnion.md +1 -1
- package/doc/type-aliases/IntrinsicFilter.md +1 -1
- package/doc/type-aliases/Item.md +1 -1
- package/doc/type-aliases/Join.md +1 -1
- package/doc/type-aliases/Key.md +1 -1
- package/doc/type-aliases/KeyFiltered.md +1 -1
- package/doc/type-aliases/KeyFromUnion.md +1 -1
- package/doc/type-aliases/Locale.md +1 -1
- package/doc/type-aliases/NextHandler.md +1 -1
- package/doc/type-aliases/NormalizedPathFieldSettings.md +7 -1
- package/doc/type-aliases/Order.md +1 -1
- package/doc/type-aliases/OrderNormalized.md +1 -1
- package/doc/type-aliases/Parameters.md +1 -1
- package/doc/type-aliases/Path.md +4 -2
- package/doc/type-aliases/PathFiltered.md +3 -1
- package/doc/type-aliases/Prettify.md +1 -1
- package/doc/type-aliases/Primitive.md +3 -1
- package/doc/type-aliases/PrimitiveObject.md +1 -1
- package/doc/type-aliases/Query.md +1 -1
- package/doc/type-aliases/QueryAggregate.md +1 -1
- package/doc/type-aliases/QueryCreate.md +1 -1
- package/doc/type-aliases/QueryCreateMultiple.md +1 -1
- package/doc/type-aliases/QueryDelete.md +1 -1
- package/doc/type-aliases/QueryDeleteMultiple.md +1 -1
- package/doc/type-aliases/QueryMethod.md +1 -1
- package/doc/type-aliases/QueryRead.md +1 -1
- package/doc/type-aliases/QueryReadMultiple.md +1 -1
- package/doc/type-aliases/QuerySettings.md +7 -1
- package/doc/type-aliases/QueryUpdate.md +1 -1
- package/doc/type-aliases/QueryUpdateMultiple.md +1 -1
- package/doc/type-aliases/Result.md +1 -1
- package/doc/type-aliases/Store.md +1 -1
- package/doc/type-aliases/Value.md +1 -1
- package/doc/type-aliases/ValueMap.md +2 -2
- package/doc/variables/CACHE.md +1 -1
- package/doc/variables/COLLATOR_DEFAULT.md +13 -0
- package/doc/variables/FILTER_ANY.md +1 -1
- package/doc/variables/FILTER_NONE.md +1 -1
- package/doc/variables/SELF.md +1 -1
- package/lib/constants/COLLATOR_DEFAULT.ts +4 -0
- package/lib/constants.ts +1 -0
- package/lib/tools/comparatorFieldValues.ts +24 -2
- package/lib/types/CombineUnion.ts +1 -1
- package/lib/types/Context.ts +10 -6
- package/lib/types/FieldFiltered.ts +3 -0
- package/lib/types/FieldKey.ts +4 -1
- package/lib/types/NormalizedPathFieldSettings.ts +4 -0
- package/lib/types/Path.ts +4 -1
- package/lib/types/PathFiltered.ts +3 -0
- package/lib/types/Primitive.ts +3 -0
- package/lib/types/Result.ts +27 -25
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const COLLATOR_DEFAULT: Intl.Collator;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"COLLATOR_DEFAULT.js","sourceRoot":"","sources":["../../lib/constants/COLLATOR_DEFAULT.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE;IAC3D,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,MAAM;CACpB,CAAC,CAAC"}
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { CACHE } from "./constants/CACHE.js";
|
|
2
|
+
export { COLLATOR_DEFAULT } from "./constants/COLLATOR_DEFAULT.js";
|
|
2
3
|
export { FILTER_ANY } from "./constants/FILTER_ANY.js";
|
|
3
4
|
export { FILTER_NONE } from "./constants/FILTER_NONE.js";
|
|
4
5
|
export { SELF } from "./constants/SELF.js";
|
package/dist/constants.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// File automatically generated by `vite-plugin-module-list`
|
|
2
2
|
export { CACHE } from "./constants/CACHE.js";
|
|
3
|
+
export { COLLATOR_DEFAULT } from "./constants/COLLATOR_DEFAULT.js";
|
|
3
4
|
export { FILTER_ANY } from "./constants/FILTER_ANY.js";
|
|
4
5
|
export { FILTER_NONE } from "./constants/FILTER_NONE.js";
|
|
5
6
|
export { SELF } from "./constants/SELF.js";
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../lib/constants.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../lib/constants.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -5,4 +5,4 @@ import type { NormalizedPathFieldSettings, QuerySettings } from "../types";
|
|
|
5
5
|
* @param options - Options for the transformer.
|
|
6
6
|
* @returns A function that takes a `FilterChildren` and returns a `FilterStringMatch` that matches the paths of the children of the item specified in the `FilterChildren`.
|
|
7
7
|
*/
|
|
8
|
-
export declare function comparatorFieldValues<T>({ pathField, pathFieldSeparator, pathFieldSeparatorEscape, }?: NormalizedPathFieldSettings<T>): QuerySettings<T>["compareFieldValues"];
|
|
8
|
+
export declare function comparatorFieldValues<T>({ pathField, pathFieldSeparator, pathFieldSeparatorEscape, collator, }?: NormalizedPathFieldSettings<T>): QuerySettings<T>["compareFieldValues"];
|
|
@@ -7,7 +7,7 @@ import { sameField } from "./sameField.js";
|
|
|
7
7
|
* @param options - Options for the transformer.
|
|
8
8
|
* @returns A function that takes a `FilterChildren` and returns a `FilterStringMatch` that matches the paths of the children of the item specified in the `FilterChildren`.
|
|
9
9
|
*/
|
|
10
|
-
export function comparatorFieldValues({ pathField = "path", pathFieldSeparator = "/", pathFieldSeparatorEscape = "\\", } = EMPTY_OBJECT) {
|
|
10
|
+
export function comparatorFieldValues({ pathField = "path", pathFieldSeparator = "/", pathFieldSeparatorEscape = "\\", collator, } = EMPTY_OBJECT) {
|
|
11
11
|
const fieldSeparatorRegexp = new RegExp(!pathFieldSeparatorEscape
|
|
12
12
|
? escapeRegex(pathFieldSeparator)
|
|
13
13
|
: `(?<!(?:${escapeRegex(pathFieldSeparatorEscape)}{2})*${escapeRegex(pathFieldSeparatorEscape)})${escapeRegex(pathFieldSeparator)}`, "g");
|
|
@@ -24,10 +24,31 @@ export function comparatorFieldValues({ pathField = "path", pathFieldSeparator =
|
|
|
24
24
|
}
|
|
25
25
|
const normalizedA = a.replaceAll?.(fieldSeparatorRegexp, "\x00");
|
|
26
26
|
const normalizedB = b.replaceAll?.(fieldSeparatorRegexp, "\x00");
|
|
27
|
-
if (
|
|
27
|
+
if (collator) {
|
|
28
|
+
const comparison = collator.compare(normalizedA, normalizedB);
|
|
29
|
+
return descending
|
|
30
|
+
? comparison > 0
|
|
31
|
+
? -1
|
|
32
|
+
: comparison < 0
|
|
33
|
+
? 1
|
|
34
|
+
: 0
|
|
35
|
+
: comparison > 0
|
|
36
|
+
? 1
|
|
37
|
+
: comparison < 0
|
|
38
|
+
? -1
|
|
39
|
+
: 0;
|
|
40
|
+
}
|
|
41
|
+
const comparison = normalizedA.localeCompare(normalizedB, undefined, {
|
|
42
|
+
numeric: true,
|
|
43
|
+
});
|
|
44
|
+
const comparisonNormalized = comparison > 0 ? 1 : comparison < 0 ? -1 : 0;
|
|
45
|
+
if (comparisonNormalized > 0) {
|
|
28
46
|
return descending ? -1 : 1;
|
|
29
47
|
}
|
|
30
|
-
|
|
48
|
+
if (comparisonNormalized < 0) {
|
|
49
|
+
return descending ? 1 : -1;
|
|
50
|
+
}
|
|
51
|
+
return 0;
|
|
31
52
|
};
|
|
32
53
|
}
|
|
33
54
|
//# sourceMappingURL=comparatorFieldValues.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comparatorFieldValues.js","sourceRoot":"","sources":["../../lib/tools/comparatorFieldValues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAQ5C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAI,EACvC,SAAS,GAAG,MAAkC,EAC9C,kBAAkB,GAAG,GAAG,EACxB,wBAAwB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"comparatorFieldValues.js","sourceRoot":"","sources":["../../lib/tools/comparatorFieldValues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAQ5C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAI,EACvC,SAAS,GAAG,MAAkC,EAC9C,kBAAkB,GAAG,GAAG,EACxB,wBAAwB,GAAG,IAAI,EAC/B,QAAQ,MAC0B,YAAY;IAC9C,MAAM,oBAAoB,GAAG,IAAI,MAAM,CACrC,CAAC,wBAAwB;QACvB,CAAC,CAAC,WAAW,CAAC,kBAAkB,CAAC;QACjC,CAAC,CAAC,UAAU,WAAW,CAAC,wBAAwB,CAAC,QAAQ,WAAW,CAAC,wBAAwB,CAAC,IAAI,WAAW,CAAC,kBAAkB,CAAC,EAAE,EACrI,GAAG,CACJ,CAAC;IACF,OAAO,CAAC,KAAK,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE;QACjC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC;YACjC,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,wFAAwF;QACxF,IAAK,CAAY,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,kBAAkB,EAAE,CAAC,EAAE,CAAC;YAC1D,OAAO,CAAC,CAAC;QACX,CAAC;QACD,IAAK,CAAY,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,kBAAkB,EAAE,CAAC,EAAE,CAAC;YAC1D,OAAO,CAAC,CAAC,CAAC;QACZ,CAAC;QACD,MAAM,WAAW,GAAI,CAAY,CAAC,UAAU,EAAE,CAC5C,oBAAoB,EACpB,MAAM,CACP,CAAC;QACF,MAAM,WAAW,GAAI,CAAY,CAAC,UAAU,EAAE,CAC5C,oBAAoB,EACpB,MAAM,CACP,CAAC;QACF,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,UAAU,GAAG,QAAQ,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;YAC9D,OAAO,UAAU;gBACf,CAAC,CAAC,UAAU,GAAG,CAAC;oBACd,CAAC,CAAC,CAAC,CAAC;oBACJ,CAAC,CAAC,UAAU,GAAG,CAAC;wBACd,CAAC,CAAC,CAAC;wBACH,CAAC,CAAC,CAAC;gBACP,CAAC,CAAC,UAAU,GAAG,CAAC;oBACd,CAAC,CAAC,CAAC;oBACH,CAAC,CAAC,UAAU,GAAG,CAAC;wBACd,CAAC,CAAC,CAAC,CAAC;wBACJ,CAAC,CAAC,CAAC,CAAC;QACZ,CAAC;QACD,MAAM,UAAU,GAAG,WAAW,CAAC,aAAa,CAAC,WAAW,EAAE,SAAS,EAAE;YACnE,OAAO,EAAE,IAAI;SACd,CAAC,CAAC;QACH,MAAM,oBAAoB,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1E,IAAI,oBAAoB,GAAG,CAAC,EAAE,CAAC;YAC7B,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7B,CAAC;QACD,IAAI,oBAAoB,GAAG,CAAC,EAAE,CAAC;YAC7B,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { KeyFromUnion } from "./KeyFromUnion";
|
|
2
2
|
import type { Primitive } from "./Primitive";
|
|
3
|
-
export type CombineUnion<U> = [unknown] extends [U] ? unknown : [0] extends [1 & U] ? any : [U] extends [Function | readonly Function[]] ? undefined : [U] extends [Primitive] ? U : [U] extends readonly [Array<any>] ? U : {
|
|
3
|
+
export type CombineUnion<U> = [unknown] extends [U] ? unknown : [0] extends [1 & U] ? any : [U] extends [Function | readonly Function[]] ? undefined : [U] extends [Primitive | undefined] ? U : [U] extends readonly [Array<any>] ? U : {
|
|
4
4
|
[K in KeyFromUnion<U>]: Continue<Combine<U, K>>;
|
|
5
5
|
};
|
|
6
6
|
type Combine<U, K extends string | number | symbol> = Exclude<Extract<U, {
|
package/dist/types/Context.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ import type { Primitive } from "./Primitive.js";
|
|
|
8
8
|
*
|
|
9
9
|
* It can be a partial object of the type `T` or a primitive value wrapped in an object with the `SELF` key.
|
|
10
10
|
*/
|
|
11
|
-
export type Context<T> = [0] extends [1 & T] ? any : T extends Primitive ? {
|
|
11
|
+
export type Context<T> = [unknown] extends [T] ? any : [0] extends [1 & T] ? any : T extends Primitive ? {
|
|
12
12
|
[SELF]: T;
|
|
13
|
-
} : {
|
|
13
|
+
} : T extends undefined ? never : {
|
|
14
14
|
[K in keyof T]?: T[K];
|
|
15
15
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { CombineUnion } from "./CombineUnion";
|
|
2
2
|
import type { KeyFiltered } from "./KeyFiltered";
|
|
3
3
|
import type { PathFiltered } from "./PathFiltered";
|
|
4
|
+
/**
|
|
5
|
+
* Returns union of keys and paths whose mapped value extend the provided `P` type.
|
|
6
|
+
*/
|
|
4
7
|
export type FieldFiltered<T, P> = KeyOrPathFiltered<CombineUnion<T>, P>;
|
|
5
8
|
type KeyOrPathFiltered<T, P> = KeyFiltered<T, P> | PathFiltered<T, P>;
|
|
6
9
|
export {};
|
package/dist/types/FieldKey.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type { SELF } from "../constants/SELF.ts";
|
|
2
2
|
import type { Key } from "./Key.ts";
|
|
3
3
|
import type { Primitive } from "./Primitive";
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Returns the type of keys that can be used to select fields from a value of type `T`.
|
|
6
|
+
*/
|
|
7
|
+
export type FieldKey<T> = [unknown] extends [T] ? Key : T extends Primitive | undefined ? typeof SELF : keyof T;
|
package/dist/types/Path.d.ts
CHANGED
|
@@ -2,6 +2,9 @@ import type { Decrement } from "./Decrement";
|
|
|
2
2
|
import type { DepthLimit } from "./DepthLimit";
|
|
3
3
|
import type { Key } from "./Key";
|
|
4
4
|
import type { Primitive } from "./Primitive";
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Returns the type of paths that can be used to select fields from a value of type `T`, with an optional depth limit `D`.
|
|
7
|
+
*/
|
|
8
|
+
export type Path<T, D = DepthLimit> = [unknown] extends [T] ? readonly (Key | never)[] : [0] extends [1 & T] ? readonly (Key | never)[] : D extends -1 ? never : T extends Primitive | undefined ? readonly never[] : T extends Array<infer P> ? readonly [number] | readonly [number, ...Path<P, Decrement<D>>] : T extends object ? {
|
|
6
9
|
[K in keyof T]: readonly [K] | readonly [K, ...Path<T[K], Decrement<D>>];
|
|
7
10
|
}[keyof T] : never;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { Decrement } from "./Decrement";
|
|
2
2
|
import type { DepthLimit } from "./DepthLimit";
|
|
3
3
|
import type { Key } from "./Key";
|
|
4
|
+
/**
|
|
5
|
+
* Returns the type of paths that can be used to select fields from a value of type `T` whose mapped value extend the provided `P` type, with an optional depth limit `D`.
|
|
6
|
+
*/
|
|
4
7
|
export type PathFiltered<T, P, D = DepthLimit> = [unknown] extends [T] ? readonly (Key | never)[] : [0] extends [1 & T] ? readonly (Key | never)[] : D extends -1 ? never : T extends P ? readonly never[] : T extends ReadonlyArray<infer I> ? Extract<I, P> extends never ? readonly [number, ...PathFiltered<I, P, Decrement<D>>] : readonly [number] : T extends object ? {
|
|
5
8
|
[K in keyof T]: Extract<T[K], P> extends never ? readonly [K, ...PathFiltered<T[K], P, Decrement<D>>] : readonly [K];
|
|
6
9
|
}[keyof T] : never;
|
package/dist/types/Result.d.ts
CHANGED
|
@@ -6,9 +6,9 @@ import type { Query } from "./Query";
|
|
|
6
6
|
import type { QueryRead } from "./QueryRead";
|
|
7
7
|
import type { QueryReadMultiple } from "./QueryReadMultiple";
|
|
8
8
|
/**
|
|
9
|
-
* Picks fields `F` from
|
|
9
|
+
* Picks fields `F` from value `T`.
|
|
10
10
|
*/
|
|
11
|
-
type PickFields<T, F extends readonly Field<T>[]> = [unknown] extends [T] ? T : T extends Primitive ? T : [F] extends [readonly [infer J, ...infer R]] ? Merge<// J is a single key
|
|
11
|
+
type PickFields<T, F extends readonly Field<T>[]> = [unknown] extends [T] ? T : T extends Primitive ? T : T extends undefined ? never : [F] extends [readonly [infer J, ...infer R]] ? Merge<// J is a single key
|
|
12
12
|
([J] extends [keyof T] ? PickField<T, J, T[J]> : [
|
|
13
13
|
J
|
|
14
14
|
] extends [readonly [infer K, ...infer S]] ? [K] extends [keyof T] ? PickField<T, K, PickFields<T[K], S extends readonly Field<T[K]>[] ? S : never>> : never : never) | (R extends readonly never[] ? never : R extends readonly Field<T>[] ? PickFields<T, R> : never)> : never;
|
package/doc/README.md
CHANGED
|
@@ -50,7 +50,7 @@ Error to be thrown in case there is an issue with the query call. Only instances
|
|
|
50
50
|
|
|
51
51
|
#### Defined in
|
|
52
52
|
|
|
53
|
-
[lib/errors/RequestError.ts:7](https://github.com/nevoland/quetch/blob/
|
|
53
|
+
[lib/errors/RequestError.ts:7](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/errors/RequestError.ts#L7)
|
|
54
54
|
|
|
55
55
|
## Properties
|
|
56
56
|
|
|
@@ -60,7 +60,7 @@ Error to be thrown in case there is an issue with the query call. Only instances
|
|
|
60
60
|
|
|
61
61
|
#### Defined in
|
|
62
62
|
|
|
63
|
-
[lib/errors/RequestError.ts:10](https://github.com/nevoland/quetch/blob/
|
|
63
|
+
[lib/errors/RequestError.ts:10](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/errors/RequestError.ts#L10)
|
|
64
64
|
|
|
65
65
|
***
|
|
66
66
|
|
|
@@ -70,7 +70,7 @@ Error to be thrown in case there is an issue with the query call. Only instances
|
|
|
70
70
|
|
|
71
71
|
#### Defined in
|
|
72
72
|
|
|
73
|
-
[lib/errors/RequestError.ts:11](https://github.com/nevoland/quetch/blob/
|
|
73
|
+
[lib/errors/RequestError.ts:11](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/errors/RequestError.ts#L11)
|
|
74
74
|
|
|
75
75
|
***
|
|
76
76
|
|
|
@@ -80,7 +80,7 @@ Error to be thrown in case there is an issue with the query call. Only instances
|
|
|
80
80
|
|
|
81
81
|
#### Defined in
|
|
82
82
|
|
|
83
|
-
[lib/errors/RequestError.ts:12](https://github.com/nevoland/quetch/blob/
|
|
83
|
+
[lib/errors/RequestError.ts:12](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/errors/RequestError.ts#L12)
|
|
84
84
|
|
|
85
85
|
***
|
|
86
86
|
|
|
@@ -90,4 +90,4 @@ Error to be thrown in case there is an issue with the query call. Only instances
|
|
|
90
90
|
|
|
91
91
|
#### Defined in
|
|
92
92
|
|
|
93
|
-
[lib/errors/RequestError.ts:9](https://github.com/nevoland/quetch/blob/
|
|
93
|
+
[lib/errors/RequestError.ts:9](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/errors/RequestError.ts#L9)
|
|
@@ -58,4 +58,4 @@ If a query occurs twice, `mergeQuery(query, currentQuery)` is called and the out
|
|
|
58
58
|
|
|
59
59
|
## Defined in
|
|
60
60
|
|
|
61
|
-
[lib/middlewares/aggregate.ts:17](https://github.com/nevoland/quetch/blob/
|
|
61
|
+
[lib/middlewares/aggregate.ts:17](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/middlewares/aggregate.ts#L17)
|
package/doc/functions/branch.md
CHANGED
|
@@ -49,4 +49,4 @@ const customFetch = combine(
|
|
|
49
49
|
|
|
50
50
|
## Defined in
|
|
51
51
|
|
|
52
|
-
[lib/middlewares/branch.ts:21](https://github.com/nevoland/quetch/blob/
|
|
52
|
+
[lib/middlewares/branch.ts:21](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/middlewares/branch.ts#L21)
|
package/doc/functions/cache.md
CHANGED
|
@@ -68,4 +68,4 @@ Cache store.
|
|
|
68
68
|
|
|
69
69
|
## Defined in
|
|
70
70
|
|
|
71
|
-
[lib/middlewares/cache.ts:8](https://github.com/nevoland/quetch/blob/
|
|
71
|
+
[lib/middlewares/cache.ts:8](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/middlewares/cache.ts#L8)
|
package/doc/functions/combine.md
CHANGED
|
@@ -116,4 +116,4 @@ Handler that combines all provided handlers.
|
|
|
116
116
|
|
|
117
117
|
## Defined in
|
|
118
118
|
|
|
119
|
-
[lib/middlewares/combine.ts:801](https://github.com/nevoland/quetch/blob/
|
|
119
|
+
[lib/middlewares/combine.ts:801](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/middlewares/combine.ts#L801)
|
|
@@ -30,4 +30,4 @@ A function that takes a `FilterChildren` and returns a `FilterStringMatch` that
|
|
|
30
30
|
|
|
31
31
|
## Defined in
|
|
32
32
|
|
|
33
|
-
[lib/tools/comparatorFieldValues.ts:18](https://github.com/nevoland/quetch/blob/
|
|
33
|
+
[lib/tools/comparatorFieldValues.ts:18](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/tools/comparatorFieldValues.ts#L18)
|
package/doc/functions/cork.md
CHANGED
|
@@ -22,4 +22,4 @@ Uncallable handler used to terminate a sequence of handlers combined with `combi
|
|
|
22
22
|
|
|
23
23
|
## Defined in
|
|
24
24
|
|
|
25
|
-
[lib/tools/cork.ts:6](https://github.com/nevoland/quetch/blob/
|
|
25
|
+
[lib/tools/cork.ts:6](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/tools/cork.ts#L6)
|
|
@@ -56,4 +56,4 @@ Function that checks queries.
|
|
|
56
56
|
|
|
57
57
|
## Defined in
|
|
58
58
|
|
|
59
|
-
[lib/tools/defineCheckQuery.ts:8](https://github.com/nevoland/quetch/blob/
|
|
59
|
+
[lib/tools/defineCheckQuery.ts:8](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/tools/defineCheckQuery.ts#L8)
|
|
@@ -68,4 +68,4 @@ A custom fetch function.
|
|
|
68
68
|
|
|
69
69
|
## Defined in
|
|
70
70
|
|
|
71
|
-
[lib/tools/defineCustomFetch.ts:11](https://github.com/nevoland/quetch/blob/
|
|
71
|
+
[lib/tools/defineCustomFetch.ts:11](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/tools/defineCustomFetch.ts#L11)
|
|
@@ -55,4 +55,4 @@ A curried generic fetch function.
|
|
|
55
55
|
|
|
56
56
|
## Defined in
|
|
57
57
|
|
|
58
|
-
[lib/tools/defineGenericFetch.ts:14](https://github.com/nevoland/quetch/blob/
|
|
58
|
+
[lib/tools/defineGenericFetch.ts:14](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/tools/defineGenericFetch.ts#L14)
|
|
@@ -26,4 +26,4 @@ Escaped regular expression
|
|
|
26
26
|
|
|
27
27
|
## Defined in
|
|
28
28
|
|
|
29
|
-
[lib/tools/escapeRegex.ts:7](https://github.com/nevoland/quetch/blob/
|
|
29
|
+
[lib/tools/escapeRegex.ts:7](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/tools/escapeRegex.ts#L7)
|
|
@@ -26,4 +26,4 @@ Handler that returns a promise that resolves to the response.
|
|
|
26
26
|
|
|
27
27
|
## Defined in
|
|
28
28
|
|
|
29
|
-
[lib/middlewares/fetchExternal.ts:12](https://github.com/nevoland/quetch/blob/
|
|
29
|
+
[lib/middlewares/fetchExternal.ts:12](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/middlewares/fetchExternal.ts#L12)
|
|
@@ -22,4 +22,4 @@ Promise that resolves to the response.
|
|
|
22
22
|
|
|
23
23
|
## Defined in
|
|
24
24
|
|
|
25
|
-
[lib/middlewares/fetchLocal.ts:9](https://github.com/nevoland/quetch/blob/
|
|
25
|
+
[lib/middlewares/fetchLocal.ts:9](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/middlewares/fetchLocal.ts#L9)
|
|
@@ -30,4 +30,4 @@ A list of fields.
|
|
|
30
30
|
|
|
31
31
|
## Defined in
|
|
32
32
|
|
|
33
|
-
[lib/tools/fieldListFromFilter.ts:11](https://github.com/nevoland/quetch/blob/
|
|
33
|
+
[lib/tools/fieldListFromFilter.ts:11](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/tools/fieldListFromFilter.ts#L11)
|
|
@@ -32,4 +32,4 @@ The union of the two lists of fields, with duplicates removed.
|
|
|
32
32
|
|
|
33
33
|
## Defined in
|
|
34
34
|
|
|
35
|
-
[lib/tools/fieldListUnion.ts:12](https://github.com/nevoland/quetch/blob/
|
|
35
|
+
[lib/tools/fieldListUnion.ts:12](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/tools/fieldListUnion.ts#L12)
|
|
@@ -60,4 +60,4 @@ A filter that can be used to match child items.
|
|
|
60
60
|
|
|
61
61
|
## Defined in
|
|
62
62
|
|
|
63
|
-
[lib/tools/filterChildren.ts:16](https://github.com/nevoland/quetch/blob/
|
|
63
|
+
[lib/tools/filterChildren.ts:16](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/tools/filterChildren.ts#L16)
|
|
@@ -24,4 +24,4 @@
|
|
|
24
24
|
|
|
25
25
|
## Defined in
|
|
26
26
|
|
|
27
|
-
[lib/tools/filterFromValue.ts:8](https://github.com/nevoland/quetch/blob/
|
|
27
|
+
[lib/tools/filterFromValue.ts:8](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/tools/filterFromValue.ts#L8)
|
package/doc/functions/get.md
CHANGED
|
@@ -41,4 +41,4 @@ The property value found at the given path, or `undefined` if it cannot be found
|
|
|
41
41
|
|
|
42
42
|
## Defined in
|
|
43
43
|
|
|
44
|
-
[lib/tools/get.ts:16](https://github.com/nevoland/quetch/blob/
|
|
44
|
+
[lib/tools/get.ts:16](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/tools/get.ts#L16)
|
|
@@ -38,4 +38,4 @@ The filters to group together.
|
|
|
38
38
|
|
|
39
39
|
## Defined in
|
|
40
40
|
|
|
41
|
-
[lib/tools/groupFilters.ts:16](https://github.com/nevoland/quetch/blob/
|
|
41
|
+
[lib/tools/groupFilters.ts:16](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/tools/groupFilters.ts#L16)
|
|
@@ -34,4 +34,4 @@
|
|
|
34
34
|
|
|
35
35
|
## Defined in
|
|
36
36
|
|
|
37
|
-
[lib/middlewares/identity.ts:3](https://github.com/nevoland/quetch/blob/
|
|
37
|
+
[lib/middlewares/identity.ts:3](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/middlewares/identity.ts#L3)
|
|
@@ -36,4 +36,4 @@ The transformed intrinsic filter.
|
|
|
36
36
|
|
|
37
37
|
## Defined in
|
|
38
38
|
|
|
39
|
-
[lib/tools/intrinsicFilter.ts:10](https://github.com/nevoland/quetch/blob/
|
|
39
|
+
[lib/tools/intrinsicFilter.ts:10](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/tools/intrinsicFilter.ts#L10)
|
|
@@ -28,4 +28,4 @@ Whether the provided filter is a group filter or not.
|
|
|
28
28
|
|
|
29
29
|
## Defined in
|
|
30
30
|
|
|
31
|
-
[lib/tools/isFilterGroup.ts:9](https://github.com/nevoland/quetch/blob/
|
|
31
|
+
[lib/tools/isFilterGroup.ts:9](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/tools/isFilterGroup.ts#L9)
|
package/doc/functions/log.md
CHANGED
|
@@ -34,4 +34,4 @@ Query handler
|
|
|
34
34
|
|
|
35
35
|
## Defined in
|
|
36
36
|
|
|
37
|
-
[lib/middlewares/log.ts:13](https://github.com/nevoland/quetch/blob/
|
|
37
|
+
[lib/middlewares/log.ts:13](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/middlewares/log.ts#L13)
|
|
@@ -38,4 +38,4 @@ The normalized order object.
|
|
|
38
38
|
|
|
39
39
|
## Defined in
|
|
40
40
|
|
|
41
|
-
[lib/tools/normalizeOrder.ts:11](https://github.com/nevoland/quetch/blob/
|
|
41
|
+
[lib/tools/normalizeOrder.ts:11](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/tools/normalizeOrder.ts#L11)
|
|
@@ -32,4 +32,4 @@ The result of the query.
|
|
|
32
32
|
|
|
33
33
|
## Defined in
|
|
34
34
|
|
|
35
|
-
[lib/tools/queryItemList.ts:48](https://github.com/nevoland/quetch/blob/
|
|
35
|
+
[lib/tools/queryItemList.ts:48](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/tools/queryItemList.ts#L48)
|
|
@@ -30,4 +30,4 @@ Query settings for path fields.
|
|
|
30
30
|
|
|
31
31
|
## Defined in
|
|
32
32
|
|
|
33
|
-
[lib/tools/querySettings.ts:13](https://github.com/nevoland/quetch/blob/
|
|
33
|
+
[lib/tools/querySettings.ts:13](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/tools/querySettings.ts#L13)
|
package/doc/functions/retry.md
CHANGED
|
@@ -36,4 +36,4 @@ Handler
|
|
|
36
36
|
|
|
37
37
|
## Defined in
|
|
38
38
|
|
|
39
|
-
[lib/middlewares/retry.ts:15](https://github.com/nevoland/quetch/blob/
|
|
39
|
+
[lib/middlewares/retry.ts:15](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/middlewares/retry.ts#L15)
|
|
@@ -38,4 +38,4 @@ The reversed order.
|
|
|
38
38
|
|
|
39
39
|
## Defined in
|
|
40
40
|
|
|
41
|
-
[lib/tools/reverseOrder.ts:11](https://github.com/nevoland/quetch/blob/
|
|
41
|
+
[lib/tools/reverseOrder.ts:11](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/tools/reverseOrder.ts#L11)
|
|
@@ -32,4 +32,4 @@ Whether the fields are the same.
|
|
|
32
32
|
|
|
33
33
|
## Defined in
|
|
34
34
|
|
|
35
|
-
[lib/tools/sameField.ts:12](https://github.com/nevoland/quetch/blob/
|
|
35
|
+
[lib/tools/sameField.ts:12](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/tools/sameField.ts#L12)
|
|
@@ -40,4 +40,4 @@ A new sorted array.
|
|
|
40
40
|
|
|
41
41
|
## Defined in
|
|
42
42
|
|
|
43
|
-
[lib/tools/sortItemList.ts:16](https://github.com/nevoland/quetch/blob/
|
|
43
|
+
[lib/tools/sortItemList.ts:16](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/tools/sortItemList.ts#L16)
|
|
@@ -38,7 +38,7 @@ An array containing the splitted path items if `path` is defined, or a function
|
|
|
38
38
|
|
|
39
39
|
### Defined in
|
|
40
40
|
|
|
41
|
-
[lib/tools/splitPath.ts:22](https://github.com/nevoland/quetch/blob/
|
|
41
|
+
[lib/tools/splitPath.ts:22](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/tools/splitPath.ts#L22)
|
|
42
42
|
|
|
43
43
|
## Call Signature
|
|
44
44
|
|
|
@@ -70,4 +70,4 @@ An array containing the splitted path items if `path` is defined, or a function
|
|
|
70
70
|
|
|
71
71
|
### Defined in
|
|
72
72
|
|
|
73
|
-
[lib/tools/splitPath.ts:27](https://github.com/nevoland/quetch/blob/
|
|
73
|
+
[lib/tools/splitPath.ts:27](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/tools/splitPath.ts#L27)
|
|
@@ -38,4 +38,4 @@ Optional query settings.
|
|
|
38
38
|
|
|
39
39
|
## Defined in
|
|
40
40
|
|
|
41
|
-
[lib/tools/testFilter.ts:25](https://github.com/nevoland/quetch/blob/
|
|
41
|
+
[lib/tools/testFilter.ts:25](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/tools/testFilter.ts#L25)
|
|
@@ -40,4 +40,4 @@ A function that takes a `FilterChildren` and returns a `FilterStringMatch` that
|
|
|
40
40
|
|
|
41
41
|
## Defined in
|
|
42
42
|
|
|
43
|
-
[lib/tools/transformerFilterChildren.ts:19](https://github.com/nevoland/quetch/blob/
|
|
43
|
+
[lib/tools/transformerFilterChildren.ts:19](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/tools/transformerFilterChildren.ts#L19)
|
|
@@ -28,4 +28,4 @@
|
|
|
28
28
|
|
|
29
29
|
## Defined in
|
|
30
30
|
|
|
31
|
-
[lib/types/CustomFetch.ts:5](https://github.com/nevoland/quetch/blob/
|
|
31
|
+
[lib/types/CustomFetch.ts:5](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/types/CustomFetch.ts#L5)
|
|
@@ -16,4 +16,4 @@ Aggregation function.
|
|
|
16
16
|
|
|
17
17
|
## Defined in
|
|
18
18
|
|
|
19
|
-
[lib/types/AggregateFunction.ts:7](https://github.com/nevoland/quetch/blob/
|
|
19
|
+
[lib/types/AggregateFunction.ts:7](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/types/AggregateFunction.ts#L7)
|
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
|
|
11
11
|
## Defined in
|
|
12
12
|
|
|
13
|
-
[lib/types/AggregateFunctionOperator.ts:3](https://github.com/nevoland/quetch/blob/
|
|
13
|
+
[lib/types/AggregateFunctionOperator.ts:3](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/types/AggregateFunctionOperator.ts#L3)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Type Alias: CombineUnion\<U\>
|
|
8
8
|
|
|
9
|
-
> **CombineUnion**\<`U`\>: [`unknown`] *extends* [`U`] ? `unknown` : [`0`] *extends* [`1` & `U`] ? `any` : [`U`] *extends* [`Function` \| readonly `Function`[]] ? `undefined` : [`U`] *extends* [[`Primitive`](Primitive.md)] ? `U` : [`U`] *extends* readonly [`any`[]] ? `U` : `{ [K in KeyFromUnion<U>]: Continue<Combine<U, K>> }`
|
|
9
|
+
> **CombineUnion**\<`U`\>: [`unknown`] *extends* [`U`] ? `unknown` : [`0`] *extends* [`1` & `U`] ? `any` : [`U`] *extends* [`Function` \| readonly `Function`[]] ? `undefined` : [`U`] *extends* [[`Primitive`](Primitive.md) \| `undefined`] ? `U` : [`U`] *extends* readonly [`any`[]] ? `U` : `{ [K in KeyFromUnion<U>]: Continue<Combine<U, K>> }`
|
|
10
10
|
|
|
11
11
|
## Type Parameters
|
|
12
12
|
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
|
|
15
15
|
## Defined in
|
|
16
16
|
|
|
17
|
-
[lib/types/CombineUnion.ts:4](https://github.com/nevoland/quetch/blob/
|
|
17
|
+
[lib/types/CombineUnion.ts:4](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/types/CombineUnion.ts#L4)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Type Alias: Context\<T\>
|
|
8
8
|
|
|
9
|
-
> **Context**\<`T`\>: [`0`] *extends* [`1` & `T`] ? `any` : `T` *extends* [`Primitive`](Primitive.md) ? `object` : `{ [K in keyof T]?: T[K] }`
|
|
9
|
+
> **Context**\<`T`\>: [`unknown`] *extends* [`T`] ? `any` : [`0`] *extends* [`1` & `T`] ? `any` : `T` *extends* [`Primitive`](Primitive.md) ? `object` : `T` *extends* `undefined` ? `never` : `{ [K in keyof T]?: T[K] }`
|
|
10
10
|
|
|
11
11
|
Describes the entity so that it can be identified or selected in a filter.
|
|
12
12
|
|
|
@@ -21,4 +21,4 @@ It can be a partial object of the type `T` or a primitive value wrapped in an ob
|
|
|
21
21
|
|
|
22
22
|
## Defined in
|
|
23
23
|
|
|
24
|
-
[lib/types/Context.ts:13](https://github.com/nevoland/quetch/blob/
|
|
24
|
+
[lib/types/Context.ts:13](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/types/Context.ts#L13)
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
|
|
15
15
|
## Defined in
|
|
16
16
|
|
|
17
|
-
[lib/types/CustomFieldAggregateMap.ts:3](https://github.com/nevoland/quetch/blob/
|
|
17
|
+
[lib/types/CustomFieldAggregateMap.ts:3](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/types/CustomFieldAggregateMap.ts#L3)
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
|
|
15
15
|
## Defined in
|
|
16
16
|
|
|
17
|
-
[lib/types/CustomFieldMap.ts:3](https://github.com/nevoland/quetch/blob/
|
|
17
|
+
[lib/types/CustomFieldMap.ts:3](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/types/CustomFieldMap.ts#L3)
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
|
|
15
15
|
## Defined in
|
|
16
16
|
|
|
17
|
-
[lib/types/Decrement.ts:5](https://github.com/nevoland/quetch/blob/
|
|
17
|
+
[lib/types/Decrement.ts:5](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/types/Decrement.ts#L5)
|
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
|
|
11
11
|
## Defined in
|
|
12
12
|
|
|
13
|
-
[lib/types/DepthLimit.ts:1](https://github.com/nevoland/quetch/blob/
|
|
13
|
+
[lib/types/DepthLimit.ts:1](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/types/DepthLimit.ts#L1)
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
|
|
15
15
|
## Defined in
|
|
16
16
|
|
|
17
|
-
[lib/types/Field.ts:5](https://github.com/nevoland/quetch/blob/
|
|
17
|
+
[lib/types/Field.ts:5](https://github.com/nevoland/quetch/blob/f06bc3e41c99a7cd13f24ba66911a74f93f25000/lib/types/Field.ts#L5)
|