@dereekb/util 13.11.14 → 13.11.15
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/eslint/index.cjs.js +10008 -394
- package/eslint/index.esm.js +9982 -392
- package/eslint/package.json +4 -4
- package/eslint/src/lib/comments.d.ts +14 -3
- package/eslint/src/lib/dbx-tag-families.d.ts +280 -0
- package/eslint/src/lib/index.d.ts +26 -3
- package/eslint/src/lib/jsdoc-parser.d.ts +116 -0
- package/eslint/src/lib/no-inline-string-empty-object-intersection.rule.d.ts +44 -0
- package/eslint/src/lib/no-inline-type-import.rule.d.ts +38 -0
- package/eslint/src/lib/no-sister-re-export.rule.d.ts +69 -0
- package/eslint/src/lib/plugin.d.ts +52 -1
- package/eslint/src/lib/prefer-canonical-jsdoc.rule.d.ts +68 -0
- package/eslint/src/lib/prefer-config-object.rule.d.ts +61 -0
- package/eslint/src/lib/prefer-maybe-type.rule.d.ts +72 -0
- package/eslint/src/lib/prefer-no-side-effects-in-jsdoc.rule.d.ts +1 -1
- package/eslint/src/lib/prefer-suggested-string.rule.d.ts +51 -0
- package/eslint/src/lib/require-constant-naming.rule.d.ts +63 -0
- package/eslint/src/lib/require-dbx-action-companion-tags.rule.d.ts +46 -0
- package/eslint/src/lib/require-dbx-auth-companion-tags.rule.d.ts +45 -0
- package/eslint/src/lib/require-dbx-docs-ui-example-companion-tags.rule.d.ts +42 -0
- package/eslint/src/lib/require-dbx-filter-companion-tags.rule.d.ts +43 -0
- package/eslint/src/lib/require-dbx-form-field-companion-tags.rule.d.ts +46 -0
- package/eslint/src/lib/require-dbx-model-companion-tags.rule.d.ts +46 -0
- package/eslint/src/lib/require-dbx-model-firebase-index-companion-tags.rule.d.ts +44 -0
- package/eslint/src/lib/require-dbx-model-snapshot-field-companion-tags.rule.d.ts +44 -0
- package/eslint/src/lib/require-dbx-pipe-companion-tags.rule.d.ts +43 -0
- package/eslint/src/lib/require-dbx-rule-companion-tags.rule.d.ts +44 -0
- package/eslint/src/lib/require-dbx-util-companion-tags.rule.d.ts +74 -0
- package/eslint/src/lib/require-dbx-web-companion-tags.rule.d.ts +43 -0
- package/eslint/src/lib/require-default-prefix-naming.rule.d.ts +60 -0
- package/eslint/src/lib/require-deprecated-alias-placement.rule.d.ts +75 -0
- package/eslint/src/lib/require-exported-jsdoc-example.rule.d.ts +61 -0
- package/eslint/src/lib/require-no-side-effects.rule.d.ts +1 -1
- package/eslint/src/lib/require-readonly-config-params.rule.d.ts +57 -0
- package/eslint/src/lib/require-single-return.rule.d.ts +42 -0
- package/fetch/index.cjs.js +95 -80
- package/fetch/index.esm.js +95 -80
- package/fetch/package.json +2 -2
- package/fetch/src/lib/error.d.ts +2 -2
- package/fetch/src/lib/fetch.d.ts +15 -15
- package/fetch/src/lib/fetch.file.d.ts +5 -5
- package/fetch/src/lib/fetch.limit.d.ts +2 -2
- package/fetch/src/lib/fetch.page.d.ts +1 -1
- package/fetch/src/lib/fetch.page.iterate.d.ts +4 -4
- package/fetch/src/lib/fetch.type.d.ts +3 -2
- package/fetch/src/lib/fetch.url.d.ts +13 -13
- package/fetch/src/lib/json.d.ts +12 -12
- package/fetch/src/lib/timeout.d.ts +2 -2
- package/fetch/src/lib/url.d.ts +11 -11
- package/index.cjs.js +2592 -2329
- package/index.esm.js +2590 -2327
- package/package.json +1 -1
- package/src/lib/array/array.boolean.d.ts +20 -20
- package/src/lib/array/array.d.ts +73 -72
- package/src/lib/array/array.factory.d.ts +8 -5
- package/src/lib/array/array.filter.d.ts +23 -20
- package/src/lib/array/array.find.d.ts +9 -8
- package/src/lib/array/array.index.d.ts +15 -14
- package/src/lib/array/array.indexed.d.ts +22 -19
- package/src/lib/array/array.make.d.ts +3 -2
- package/src/lib/array/array.map.d.ts +5 -5
- package/src/lib/array/array.number.d.ts +27 -27
- package/src/lib/array/array.random.d.ts +11 -10
- package/src/lib/array/array.set.d.ts +14 -14
- package/src/lib/array/array.string.d.ts +31 -31
- package/src/lib/array/array.unique.d.ts +22 -20
- package/src/lib/array/array.value.d.ts +3 -2
- package/src/lib/assertion/assert.error.d.ts +8 -8
- package/src/lib/assertion/assertion.d.ts +5 -5
- package/src/lib/assertion/assertion.generic.d.ts +3 -3
- package/src/lib/assertion/assertion.number.d.ts +6 -6
- package/src/lib/auth/auth.role.claims.d.ts +12 -11
- package/src/lib/auth/auth.role.d.ts +3 -3
- package/src/lib/auth/pkce.d.ts +2 -2
- package/src/lib/boolean.d.ts +11 -11
- package/src/lib/cache/cache.memoize.d.ts +6 -6
- package/src/lib/contact/domain.d.ts +9 -9
- package/src/lib/contact/email.d.ts +11 -11
- package/src/lib/contact/phone.d.ts +12 -12
- package/src/lib/contact/random.d.ts +11 -9
- package/src/lib/date/date.d.ts +60 -59
- package/src/lib/date/date.time.d.ts +2 -2
- package/src/lib/date/date.unix.d.ts +8 -8
- package/src/lib/date/duration.d.ts +17 -17
- package/src/lib/date/expires.d.ts +29 -27
- package/src/lib/date/hour.d.ts +23 -23
- package/src/lib/date/minute.d.ts +6 -6
- package/src/lib/date/time.d.ts +10 -9
- package/src/lib/date/week.d.ts +32 -31
- package/src/lib/encryption/encryption.object.d.ts +3 -3
- package/src/lib/error/error.d.ts +13 -12
- package/src/lib/error/error.server.d.ts +4 -4
- package/src/lib/file/pdf.d.ts +4 -4
- package/src/lib/filter/filter.d.ts +3 -2
- package/src/lib/function/function.boolean.d.ts +4 -3
- package/src/lib/function/function.forward.d.ts +6 -4
- package/src/lib/getter/getter.d.ts +24 -19
- package/src/lib/getter/getter.map.d.ts +6 -5
- package/src/lib/getter/getter.util.d.ts +3 -2
- package/src/lib/grouping.d.ts +25 -24
- package/src/lib/hash.d.ts +11 -10
- package/src/lib/iterable/iterable.d.ts +39 -39
- package/src/lib/iterable/iterable.map.d.ts +3 -3
- package/src/lib/key.d.ts +16 -16
- package/src/lib/map/map.d.ts +12 -12
- package/src/lib/map/map.intersection.d.ts +3 -3
- package/src/lib/map/map.key.d.ts +16 -14
- package/src/lib/misc/host.d.ts +2 -2
- package/src/lib/model/id.batch.d.ts +4 -3
- package/src/lib/model/id.factory.d.ts +4 -3
- package/src/lib/model/model.conversion.d.ts +19 -14
- package/src/lib/model/model.conversion.field.d.ts +2 -2
- package/src/lib/model/model.copy.d.ts +5 -4
- package/src/lib/model/model.d.ts +48 -46
- package/src/lib/model/model.modify.d.ts +10 -8
- package/src/lib/nodejs/stream.d.ts +6 -5
- package/src/lib/number/bitwise.dencoder.d.ts +12 -12
- package/src/lib/number/bound.d.ts +16 -13
- package/src/lib/number/dollar.d.ts +6 -5
- package/src/lib/number/encoded.d.ts +7 -7
- package/src/lib/number/factory.d.ts +4 -3
- package/src/lib/number/number.d.ts +37 -37
- package/src/lib/number/random.d.ts +11 -10
- package/src/lib/number/round.d.ts +34 -30
- package/src/lib/number/sort.d.ts +3 -2
- package/src/lib/number/transform.d.ts +5 -4
- package/src/lib/object/object.array.d.ts +6 -6
- package/src/lib/object/object.array.delta.d.ts +3 -2
- package/src/lib/object/object.d.ts +12 -12
- package/src/lib/object/object.empty.d.ts +3 -3
- package/src/lib/object/object.equal.d.ts +11 -10
- package/src/lib/object/object.filter.pojo.d.ts +74 -74
- package/src/lib/object/object.filter.tuple.d.ts +26 -26
- package/src/lib/object/object.flatten.d.ts +4 -4
- package/src/lib/object/object.key.d.ts +6 -4
- package/src/lib/object/object.map.d.ts +15 -13
- package/src/lib/page/page.d.ts +5 -5
- package/src/lib/page/page.filter.d.ts +8 -8
- package/src/lib/path/path.d.ts +98 -88
- package/src/lib/promise/callback.d.ts +2 -2
- package/src/lib/promise/is.d.ts +6 -6
- package/src/lib/promise/poll.d.ts +9 -9
- package/src/lib/promise/promise.d.ts +33 -30
- package/src/lib/promise/promise.factory.d.ts +4 -3
- package/src/lib/promise/promise.loop.d.ts +11 -11
- package/src/lib/promise/promise.task.d.ts +6 -5
- package/src/lib/promise/promise.type.d.ts +3 -3
- package/src/lib/promise/use.d.ts +3 -3
- package/src/lib/relation/relation.d.ts +15 -15
- package/src/lib/service/handler.config.d.ts +20 -16
- package/src/lib/service/handler.d.ts +3 -2
- package/src/lib/service/typed.service.d.ts +2 -2
- package/src/lib/set/set.d.ts +62 -59
- package/src/lib/set/set.delta.d.ts +5 -4
- package/src/lib/set/set.hashset.d.ts +5 -5
- package/src/lib/set/set.selection.d.ts +5 -4
- package/src/lib/sort.d.ts +11 -11
- package/src/lib/storage/storage.d.ts +2 -1
- package/src/lib/storage/storage.error.d.ts +4 -4
- package/src/lib/storage/storage.memory.d.ts +7 -7
- package/src/lib/storage/storage.object.d.ts +5 -5
- package/src/lib/string/case.d.ts +6 -6
- package/src/lib/string/char.d.ts +30 -29
- package/src/lib/string/dencoder.d.ts +25 -20
- package/src/lib/string/factory.d.ts +11 -8
- package/src/lib/string/html.d.ts +19 -19
- package/src/lib/string/mimetype.d.ts +9 -8
- package/src/lib/string/prefix.d.ts +8 -8
- package/src/lib/string/replace.d.ts +45 -39
- package/src/lib/string/search.d.ts +5 -4
- package/src/lib/string/sort.d.ts +13 -4
- package/src/lib/string/string.d.ts +44 -43
- package/src/lib/string/transform.d.ts +32 -23
- package/src/lib/string/tree.d.ts +5 -4
- package/src/lib/string/url.d.ts +5 -4
- package/src/lib/tree/tree.array.d.ts +5 -4
- package/src/lib/tree/tree.expand.d.ts +6 -6
- package/src/lib/tree/tree.explore.d.ts +13 -10
- package/src/lib/tree/tree.flatten.d.ts +10 -10
- package/src/lib/type.d.ts +42 -12
- package/src/lib/value/address.d.ts +7 -7
- package/src/lib/value/bound.d.ts +70 -66
- package/src/lib/value/build.d.ts +6 -6
- package/src/lib/value/comparator.d.ts +19 -17
- package/src/lib/value/cron.d.ts +2 -2
- package/src/lib/value/decision.d.ts +6 -5
- package/src/lib/value/equal.d.ts +11 -9
- package/src/lib/value/indexed.d.ts +101 -85
- package/src/lib/value/label.d.ts +2 -2
- package/src/lib/value/map.d.ts +20 -16
- package/src/lib/value/maybe.d.ts +36 -36
- package/src/lib/value/modifier.d.ts +24 -23
- package/src/lib/value/point.d.ts +85 -77
- package/src/lib/value/url.d.ts +2 -2
- package/src/lib/value/use.d.ts +36 -33
- package/src/lib/value/vector.d.ts +15 -14
- package/test/index.cjs.js +41 -36
- package/test/index.esm.js +41 -36
- package/test/package.json +2 -2
- package/test/src/lib/jest/jest.fail.d.ts +2 -2
- package/test/src/lib/shared/shared.d.ts +20 -20
- package/test/src/lib/shared/shared.fail.d.ts +21 -16
- package/test/src/lib/shared/shared.function.d.ts +4 -4
- package/test/src/lib/shared/shared.wrap.d.ts +10 -10
|
@@ -34,9 +34,9 @@ export interface MakeUrlSearchParamsOptions {
|
|
|
34
34
|
/**
|
|
35
35
|
* Creates URLSearchParams from the input objects. The input objects are merged together.
|
|
36
36
|
*
|
|
37
|
-
* @param input -
|
|
38
|
-
* @param options -
|
|
39
|
-
* @returns
|
|
37
|
+
* @param input - One or more objects (or nullish values) whose key-value pairs become search parameters.
|
|
38
|
+
* @param options - Optional configuration for filtering, omitting keys, and space encoding.
|
|
39
|
+
* @returns A URLSearchParams instance built from the merged and filtered input.
|
|
40
40
|
*/
|
|
41
41
|
export declare function makeUrlSearchParams(input: Maybe<ArrayOrValue<Maybe<object | Record<string, string | number>>>>, options?: Maybe<MakeUrlSearchParamsOptions>): URLSearchParams;
|
|
42
42
|
/**
|
|
@@ -47,9 +47,9 @@ export declare function makeUrlSearchParams(input: Maybe<ArrayOrValue<Maybe<obje
|
|
|
47
47
|
* RFC 3986 percent-encoded output (`%20` for spaces) instead of the
|
|
48
48
|
* `application/x-www-form-urlencoded` default (`+` for spaces).
|
|
49
49
|
*
|
|
50
|
-
* @param input -
|
|
51
|
-
* @param options -
|
|
52
|
-
* @returns
|
|
50
|
+
* @param input - Objects to encode as query parameters.
|
|
51
|
+
* @param options - Encoding options.
|
|
52
|
+
* @returns The encoded query string (without a leading `?`)
|
|
53
53
|
*/
|
|
54
54
|
export declare function makeUrlSearchParamsString(input: Maybe<ArrayOrValue<Maybe<object | Record<string, string | number>>>>, options?: Maybe<MakeUrlSearchParamsOptions>): string;
|
|
55
55
|
/**
|
|
@@ -60,6 +60,11 @@ export declare function makeUrlSearchParamsString(input: Maybe<ArrayOrValue<Mayb
|
|
|
60
60
|
* {@link MakeUrlSearchParamsOptions} such as `omitKeys`, `filterEmptyValues`, and
|
|
61
61
|
* `useUrlSearchSpaceHandling`.
|
|
62
62
|
*
|
|
63
|
+
* @param url - The URL string to update.
|
|
64
|
+
* @param params - New search parameters to merge into the URL.
|
|
65
|
+
* @param options - Optional configuration for filtering, omitting keys, and space encoding.
|
|
66
|
+
* @returns The URL string with updated query parameters.
|
|
67
|
+
*
|
|
63
68
|
* @example
|
|
64
69
|
* ```typescript
|
|
65
70
|
* // Add params to a URL with no query string
|
|
@@ -74,17 +79,12 @@ export declare function makeUrlSearchParamsString(input: Maybe<ArrayOrValue<Mayb
|
|
|
74
79
|
* updateUrlSearchParams('https://example.com', { scope: 'openid profile' }, { useUrlSearchSpaceHandling: true });
|
|
75
80
|
* // => 'https://example.com?scope=openid%20profile'
|
|
76
81
|
* ```
|
|
77
|
-
*
|
|
78
|
-
* @param url - the URL string to update
|
|
79
|
-
* @param params - new search parameters to merge into the URL
|
|
80
|
-
* @param options - optional configuration for filtering, omitting keys, and space encoding
|
|
81
|
-
* @returns the URL string with updated query parameters
|
|
82
82
|
*/
|
|
83
83
|
export declare function updateUrlSearchParams(url: string, params: Maybe<ArrayOrValue<Maybe<object | Record<string, string | number>>>>, options?: Maybe<MakeUrlSearchParamsOptions>): string;
|
|
84
84
|
/**
|
|
85
85
|
* Merges an array of MakeUrlSearchParamsOptions into a single MakeUrlSearchParamsOptions value.
|
|
86
86
|
*
|
|
87
|
-
* @param options -
|
|
88
|
-
* @returns
|
|
87
|
+
* @param options - One or more options objects whose omitKeys sets are combined.
|
|
88
|
+
* @returns A single MakeUrlSearchParamsOptions with the union of all omitKeys.
|
|
89
89
|
*/
|
|
90
90
|
export declare function mergeMakeUrlSearchParamsOptions(options: ArrayOrValue<Maybe<MakeUrlSearchParamsOptions>>): MakeUrlSearchParamsOptions;
|
package/fetch/src/lib/json.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type MapSameFunction } from '@dereekb/util';
|
|
1
|
+
import { type MapSameFunction, type Maybe } from '@dereekb/util';
|
|
2
2
|
import { type FetchMethod, type ConfiguredFetch } from './fetch.type';
|
|
3
3
|
import { type FetchURLInput } from './url';
|
|
4
4
|
export type FetchJsonBody = string | object;
|
|
@@ -12,10 +12,10 @@ export declare class JsonResponseParseError extends Error {
|
|
|
12
12
|
* @param body
|
|
13
13
|
* @returns
|
|
14
14
|
*/
|
|
15
|
-
export declare function fetchJsonBodyString(body: FetchJsonBody
|
|
15
|
+
export declare function fetchJsonBodyString(body: Maybe<FetchJsonBody>): Maybe<string>;
|
|
16
16
|
export interface FetchJsonInput extends Omit<RequestInit, 'body'> {
|
|
17
17
|
readonly method: FetchMethod;
|
|
18
|
-
readonly body?: FetchJsonBody
|
|
18
|
+
readonly body?: Maybe<FetchJsonBody>;
|
|
19
19
|
/**
|
|
20
20
|
* Optional intercept function to intercept/transform the response.
|
|
21
21
|
*
|
|
@@ -32,7 +32,7 @@ export type FetchJsonWithInputFunction = <R>(url: FetchURLInput, input: FetchJso
|
|
|
32
32
|
*/
|
|
33
33
|
export type FetchJsonFunction = FetchJsonGetFunction & FetchJsonMethodAndBodyFunction & FetchJsonWithInputFunction;
|
|
34
34
|
export type FetchJsonInterceptJsonResponseFunction = (json: unknown, response: Response) => unknown;
|
|
35
|
-
export type HandleFetchJsonParseErrorFunction = (response: Response) => string
|
|
35
|
+
export type HandleFetchJsonParseErrorFunction = (response: Response) => Maybe<string>;
|
|
36
36
|
export declare const throwJsonResponseParseErrorFunction: HandleFetchJsonParseErrorFunction;
|
|
37
37
|
export declare const returnNullHandleFetchJsonParseErrorFunction: HandleFetchJsonParseErrorFunction;
|
|
38
38
|
export interface FetchJsonFunctionConfig extends FetchJsonRequestInitFunctionConfig {
|
|
@@ -50,9 +50,9 @@ export interface FetchJsonFunctionConfig extends FetchJsonRequestInitFunctionCon
|
|
|
50
50
|
/**
|
|
51
51
|
* Creates a FetchJsonFunction from the input ConfiguredFetch.
|
|
52
52
|
*
|
|
53
|
-
* @param fetch -
|
|
54
|
-
* @param inputConfig -
|
|
55
|
-
* @returns
|
|
53
|
+
* @param fetch - The configured fetch function to use for making HTTP requests.
|
|
54
|
+
* @param inputConfig - Optional configuration or error handler for JSON parsing; when a function is provided it is used as the parse error handler.
|
|
55
|
+
* @returns A FetchJsonFunction that performs requests and parses JSON responses.
|
|
56
56
|
*/
|
|
57
57
|
export declare function fetchJsonFunction(fetch: ConfiguredFetch, inputConfig?: FetchJsonFunctionConfig | HandleFetchJsonParseErrorFunction): FetchJsonFunction;
|
|
58
58
|
export interface FetchJsonRequestInitFunctionConfig {
|
|
@@ -61,19 +61,19 @@ export interface FetchJsonRequestInitFunctionConfig {
|
|
|
61
61
|
*
|
|
62
62
|
* Defaults to GET
|
|
63
63
|
*/
|
|
64
|
-
defaultMethod?: string;
|
|
64
|
+
readonly defaultMethod?: string;
|
|
65
65
|
/**
|
|
66
66
|
* Optional map function to modify the FetchJsonInput before it is finalized into a RequestInit value.
|
|
67
67
|
*/
|
|
68
|
-
mapFetchJsonInput?: FetchJsonInputMapFunction;
|
|
68
|
+
readonly mapFetchJsonInput?: FetchJsonInputMapFunction;
|
|
69
69
|
}
|
|
70
|
-
export type FetchJsonRequestInitFunction = (methodOrInput?: string | FetchJsonInput
|
|
70
|
+
export type FetchJsonRequestInitFunction = (methodOrInput?: Maybe<string | FetchJsonInput>, body?: FetchJsonBody) => RequestInit;
|
|
71
71
|
/**
|
|
72
72
|
* Creates a {@link FetchJsonRequestInitFunction} that converts method/body inputs into a fully formed {@link RequestInit},
|
|
73
73
|
* applying the configured default method and optional input mapping.
|
|
74
74
|
*
|
|
75
|
-
* @param config -
|
|
76
|
-
* @returns
|
|
75
|
+
* @param config - Default-method and input-mapping overrides applied by the generated function.
|
|
76
|
+
* @returns Reusable builder that resolves a `RequestInit` for each request.
|
|
77
77
|
*/
|
|
78
78
|
export declare function fetchJsonRequestInitFunction(config?: FetchJsonRequestInitFunctionConfig): FetchJsonRequestInitFunction;
|
|
79
79
|
export declare const fetchJsonRequestInit: FetchJsonRequestInitFunction;
|
|
@@ -9,7 +9,7 @@ export declare class FetchTimeoutError extends BaseError {
|
|
|
9
9
|
* is present on the RequestInit or Request and no abort signal is already provided,
|
|
10
10
|
* an AbortController is created to abort the request after the specified duration.
|
|
11
11
|
*
|
|
12
|
-
* @param inputFetch -
|
|
13
|
-
* @returns
|
|
12
|
+
* @param inputFetch - The fetch function to wrap with timeout behavior.
|
|
13
|
+
* @returns A wrapped fetch function that enforces timeouts via AbortController.
|
|
14
14
|
*/
|
|
15
15
|
export declare function fetchTimeout(inputFetch: typeof fetch): typeof fetch;
|
package/fetch/src/lib/url.d.ts
CHANGED
|
@@ -15,28 +15,28 @@ export type FetchURLInput = SimpleFetchURLInput | FetchURLConfiguration;
|
|
|
15
15
|
* Resolves a FetchURLInput to a URL string. Handles plain strings, URL objects, and
|
|
16
16
|
* FetchURLConfiguration objects by appending query parameters when provided.
|
|
17
17
|
*
|
|
18
|
-
* @param input - a string
|
|
19
|
-
* @returns
|
|
18
|
+
* @param input - URL source to normalize; may already be a string or carry query parameters to append.
|
|
19
|
+
* @returns Fully resolved request URL ready to pass to `fetch`.
|
|
20
20
|
*/
|
|
21
21
|
export declare function fetchURL(input: FetchURLInput): string;
|
|
22
22
|
/**
|
|
23
23
|
* Type guard that checks whether the given value is a URL instance.
|
|
24
24
|
*
|
|
25
|
-
* @param input -
|
|
26
|
-
* @returns
|
|
25
|
+
* @param input - The value to test.
|
|
26
|
+
* @returns True if the input is a URL instance.
|
|
27
27
|
*/
|
|
28
28
|
export declare function isURL(input: unknown): input is URL;
|
|
29
29
|
/**
|
|
30
30
|
* Type guard that checks whether the given value is a URLSearchParams instance.
|
|
31
31
|
*
|
|
32
|
-
* @param input -
|
|
33
|
-
* @returns
|
|
32
|
+
* @param input - The value to test.
|
|
33
|
+
* @returns True if the input is a URLSearchParams instance.
|
|
34
34
|
*/
|
|
35
35
|
export declare function isURLSearchParams(input: unknown): input is URLSearchParams;
|
|
36
36
|
export type FetchURLQueryParamsInput = URLSearchParams | FetchURLSearchParamsObject | Iterable<FetchURLQueryKeyValueStringTuple> | Iterable<FetchURLQueryKeyValueTuple> | string;
|
|
37
37
|
export type FetchURLQueryKeyValueStringTuple = [string, string];
|
|
38
38
|
/**
|
|
39
|
-
* Converts the input
|
|
39
|
+
* Converts the input.
|
|
40
40
|
*
|
|
41
41
|
* @param input
|
|
42
42
|
* @returns
|
|
@@ -49,8 +49,8 @@ export type FetchURLQueryKeyValueTupleKeyValue = string | number | boolean;
|
|
|
49
49
|
* Converts a FetchURLQueryParamsInput value (URLSearchParams, string, iterable of tuples, or
|
|
50
50
|
* params object) into a URLSearchParams instance.
|
|
51
51
|
*
|
|
52
|
-
* @param input -
|
|
53
|
-
* @returns
|
|
52
|
+
* @param input - The query parameters input to convert.
|
|
53
|
+
* @returns A URLSearchParams instance representing the input.
|
|
54
54
|
*/
|
|
55
55
|
export declare function queryParamsToSearchParams(input: FetchURLQueryParamsInput): URLSearchParams;
|
|
56
56
|
export type FetchURLSearchTupleValueKey = string | number;
|
|
@@ -60,7 +60,7 @@ export type FetchURLSearchParamsObject = Partial<Record<FetchURLQueryKeyValueTup
|
|
|
60
60
|
* Converts a FetchURLSearchParamsObject (a plain key-value record) into a URLSearchParams instance,
|
|
61
61
|
* expanding array values into multiple entries for the same key and filtering out null/undefined values.
|
|
62
62
|
*
|
|
63
|
-
* @param input -
|
|
64
|
-
* @returns
|
|
63
|
+
* @param input - The params object to convert.
|
|
64
|
+
* @returns A URLSearchParams instance representing the input object.
|
|
65
65
|
*/
|
|
66
66
|
export declare function fetchURLSearchParamsObjectToURLSearchParams(input: FetchURLSearchParamsObject): URLSearchParams;
|