@orpc/shared 2.0.0-beta.49 → 2.0.0-beta.50
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/args.d.ts +1 -1
- package/dist/args.js +4 -2
- package/dist/array.d.ts +4 -1
- package/dist/array.js +11 -5
- package/dist/bigint.d.ts +1 -1
- package/dist/bigint.js +12 -16
- package/dist/buffer.d.ts +4 -4
- package/dist/buffer.js +44 -67
- package/dist/compare.d.ts +1 -1
- package/dist/compare.js +23 -42
- package/dist/consts.d.ts +1 -1
- package/dist/consts.js +3 -1
- package/dist/error.d.ts +1 -1
- package/dist/error.js +4 -2
- package/dist/function.d.ts +1 -1
- package/dist/function.js +27 -32
- package/dist/http.d.ts +29 -0
- package/dist/http.js +128 -94
- package/dist/id.d.ts +1 -1
- package/dist/id.js +11 -11
- package/dist/index.d.ts +26 -34
- package/dist/index.js +23 -32
- package/dist/interceptor.d.ts +17 -17
- package/dist/interceptor.js +106 -126
- package/dist/iterator.d.ts +41 -41
- package/dist/iterator.js +136 -152
- package/dist/object.d.ts +10 -8
- package/dist/object.js +176 -227
- package/dist/plugin.d.ts +7 -7
- package/dist/plugin.js +41 -57
- package/dist/promise.d.ts +4 -4
- package/dist/promise.js +28 -28
- package/dist/proxy.d.ts +2 -2
- package/dist/proxy.js +23 -22
- package/dist/queue.d.ts +13 -13
- package/dist/queue.js +64 -79
- package/dist/regex.d.ts +9 -0
- package/dist/regex.js +11 -0
- package/dist/signal.d.ts +7 -2
- package/dist/signal.js +83 -80
- package/dist/stream.d.ts +23 -23
- package/dist/stream.js +118 -144
- package/dist/tracing.d.ts +50 -50
- package/dist/tracing.js +60 -85
- package/dist/types.d.ts +7 -10
- package/dist/value.d.ts +1 -1
- package/dist/value.js +5 -5
- package/package.json +2 -2
- package/dist/types.js +0 -1
package/dist/args.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export type MaybeOptionalOptions<TOptions> = object extends TOptions ? [options?: TOptions] : [options: TOptions];
|
|
2
|
-
export declare function resolveMaybeOptionalOptions<T>(rest: MaybeOptionalOptions<T>): T;
|
|
2
|
+
export declare function resolveMaybeOptionalOptions<T>(rest: MaybeOptionalOptions<T>): T;
|
package/dist/args.js
CHANGED
package/dist/array.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
export declare function toArray<T>(value: T): T extends readonly any[] ? T : Exclude<T, undefined | null>[];
|
|
2
1
|
export declare function splitInHalf<T>(arr: readonly T[]): [T[], T[]];
|
|
2
|
+
/**
|
|
3
|
+
* Keeps only the last `maxSize` items, returning the same array when it already fits.
|
|
4
|
+
*/
|
|
5
|
+
export declare function takeLast<T>(items: T[], maxSize: number): T[];
|
package/dist/array.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// src/array.ts
|
|
2
|
+
function splitInHalf(arr) {
|
|
3
|
+
const half = Math.ceil(arr.length / 2);
|
|
4
|
+
return [arr.slice(0, half), arr.slice(half)];
|
|
3
5
|
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Keeps only the last `maxSize` items, returning the same array when it already fits.
|
|
8
|
+
*/
|
|
9
|
+
function takeLast(items, maxSize) {
|
|
10
|
+
if (items.length <= maxSize) return items;
|
|
11
|
+
return items.slice(items.length - maxSize);
|
|
7
12
|
}
|
|
13
|
+
export { splitInHalf, takeLast };
|
package/dist/bigint.d.ts
CHANGED
|
@@ -6,4 +6,4 @@ export declare const DEFAULT_MAX_BIGINT_DIGITS = 4300;
|
|
|
6
6
|
* Parses a `bigint.toString()` string, or returns `undefined` if it is invalid or has more than `maxDigits` digits.
|
|
7
7
|
* The length is checked first, since `BigInt()` is super-linear in the digit count.
|
|
8
8
|
*/
|
|
9
|
-
export declare function parseBigIntString(value: string, maxDigits: number): bigint | undefined;
|
|
9
|
+
export declare function parseBigIntString(value: string, maxDigits: number): bigint | undefined;
|
package/dist/bigint.js
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
|
+
import { INTEGER_REGEX } from "./regex.js";
|
|
2
|
+
// src/bigint.ts
|
|
1
3
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
* Default maximum digits, excluding a leading `-`, when parsing a `bigint` from a string.
|
|
5
|
+
*/
|
|
6
|
+
const DEFAULT_MAX_BIGINT_DIGITS = 4300;
|
|
5
7
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*/
|
|
13
|
-
export function parseBigIntString(value, maxDigits) {
|
|
14
|
-
const digits = value.startsWith('-') ? value.length - 1 : value.length;
|
|
15
|
-
if (digits > maxDigits || !BIGINT_PATTERN.test(value)) {
|
|
16
|
-
return undefined;
|
|
17
|
-
}
|
|
18
|
-
return BigInt(value);
|
|
8
|
+
* Parses a `bigint.toString()` string, or returns `undefined` if it is invalid or has more than `maxDigits` digits.
|
|
9
|
+
* The length is checked first, since `BigInt()` is super-linear in the digit count.
|
|
10
|
+
*/
|
|
11
|
+
function parseBigIntString(value, maxDigits) {
|
|
12
|
+
if ((value.startsWith("-") ? value.length - 1 : value.length) > maxDigits || !INTEGER_REGEX.test(value)) return;
|
|
13
|
+
return BigInt(value);
|
|
19
14
|
}
|
|
15
|
+
export { DEFAULT_MAX_BIGINT_DIGITS, parseBigIntString };
|
package/dist/buffer.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Arrayable } from "type-fest";
|
|
2
2
|
/**
|
|
3
3
|
* Load Request/Response/Blob/File/.. to a buffer (Uint8Array<ArrayBuffer>).
|
|
4
4
|
*
|
|
5
5
|
* Prefers the newer `.bytes` method when available as it more efficient but not widely supported yet.
|
|
6
6
|
*/
|
|
7
|
-
export declare function loadBytes(source: Pick<Blob,
|
|
7
|
+
export declare function loadBytes(source: Pick<Blob, "arrayBuffer" | "bytes">): ReturnType<Blob["bytes"]>;
|
|
8
8
|
/**
|
|
9
9
|
* Normalize text or binary-like inputs to either:
|
|
10
10
|
* - the original string value, or
|
|
11
11
|
* - a Uint8Array view over the source bytes.
|
|
12
12
|
*/
|
|
13
|
-
export declare function toStringOrBytes(source: Arrayable<string | ArrayBuffer | Pick<Uint8Array<ArrayBuffer>,
|
|
13
|
+
export declare function toStringOrBytes(source: Arrayable<string | ArrayBuffer | Pick<Uint8Array<ArrayBuffer>, "buffer" | "byteOffset" | "byteLength">>): string | Awaited<ReturnType<Blob["bytes"]>>;
|
|
14
14
|
/**
|
|
15
15
|
* Encodes bytes to standard, padded base64, as data URLs and many protocols require.
|
|
16
16
|
* Prefers the native `toBase64` or `Buffer`, which are far faster for large outputs.
|
|
17
17
|
*/
|
|
18
|
-
export declare function encodeBase64(bytes: Uint8Array): string;
|
|
18
|
+
export declare function encodeBase64(bytes: Uint8Array): string;
|
package/dist/buffer.js
CHANGED
|
@@ -1,77 +1,54 @@
|
|
|
1
|
+
// src/buffer.ts
|
|
1
2
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
// oxlint-disable-next-line no-restricted-properties
|
|
10
|
-
return source.bytes();
|
|
11
|
-
}
|
|
12
|
-
return new Uint8Array(await source.arrayBuffer());
|
|
3
|
+
* Load Request/Response/Blob/File/.. to a buffer (Uint8Array<ArrayBuffer>).
|
|
4
|
+
*
|
|
5
|
+
* Prefers the newer `.bytes` method when available as it more efficient but not widely supported yet.
|
|
6
|
+
*/
|
|
7
|
+
async function loadBytes(source) {
|
|
8
|
+
if (typeof source.bytes === "function") return source.bytes();
|
|
9
|
+
return new Uint8Array(await source.arrayBuffer());
|
|
13
10
|
}
|
|
14
11
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
if (Array.isArray(source)) {
|
|
27
|
-
return concatBytes(source);
|
|
28
|
-
}
|
|
29
|
-
if (source instanceof Uint8Array) {
|
|
30
|
-
return source;
|
|
31
|
-
}
|
|
32
|
-
return new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
|
|
12
|
+
* Normalize text or binary-like inputs to either:
|
|
13
|
+
* - the original string value, or
|
|
14
|
+
* - a Uint8Array view over the source bytes.
|
|
15
|
+
*/
|
|
16
|
+
function toStringOrBytes(source) {
|
|
17
|
+
if (typeof source === "string") return source;
|
|
18
|
+
if (source instanceof ArrayBuffer) return new Uint8Array(source);
|
|
19
|
+
if (Array.isArray(source)) return concatBytes(source);
|
|
20
|
+
if (source instanceof Uint8Array) return source;
|
|
21
|
+
return new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
|
|
33
22
|
}
|
|
34
23
|
function toBytes(item) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return new Uint8Array(item);
|
|
40
|
-
}
|
|
41
|
-
if (item instanceof Uint8Array) {
|
|
42
|
-
return item;
|
|
43
|
-
}
|
|
44
|
-
return new Uint8Array(item.buffer, item.byteOffset, item.byteLength);
|
|
24
|
+
if (typeof item === "string") return new TextEncoder().encode(item);
|
|
25
|
+
if (item instanceof ArrayBuffer) return new Uint8Array(item);
|
|
26
|
+
if (item instanceof Uint8Array) return item;
|
|
27
|
+
return new Uint8Array(item.buffer, item.byteOffset, item.byteLength);
|
|
45
28
|
}
|
|
46
29
|
function concatBytes(items) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
30
|
+
const chunks = items.map(toBytes);
|
|
31
|
+
const totalLength = chunks.reduce((sum, chunk) => sum + chunk.byteLength, 0);
|
|
32
|
+
const result = new Uint8Array(totalLength);
|
|
33
|
+
let offset = 0;
|
|
34
|
+
for (const chunk of chunks) {
|
|
35
|
+
result.set(chunk, offset);
|
|
36
|
+
offset += chunk.byteLength;
|
|
37
|
+
}
|
|
38
|
+
return result;
|
|
56
39
|
}
|
|
57
40
|
/**
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
const chunkSize = 8192; // 8KB chunks to stay well below call stack limits
|
|
72
|
-
let binaryString = '';
|
|
73
|
-
for (let i = 0; i < bytes.length; i += chunkSize) {
|
|
74
|
-
binaryString += String.fromCharCode(...bytes.subarray(i, i + chunkSize));
|
|
75
|
-
}
|
|
76
|
-
return btoa(binaryString);
|
|
41
|
+
* Encodes bytes to standard, padded base64, as data URLs and many protocols require.
|
|
42
|
+
* Prefers the native `toBase64` or `Buffer`, which are far faster for large outputs.
|
|
43
|
+
*/
|
|
44
|
+
function encodeBase64(bytes) {
|
|
45
|
+
const native = bytes;
|
|
46
|
+
if (typeof native.toBase64 === "function") return native.toBase64();
|
|
47
|
+
const NodeBuffer = globalThis.process?.getBuiltinModule?.("node:buffer")?.Buffer;
|
|
48
|
+
if (NodeBuffer !== void 0) return NodeBuffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength).toString("base64");
|
|
49
|
+
const chunkSize = 8192;
|
|
50
|
+
let binaryString = "";
|
|
51
|
+
for (let i = 0; i < bytes.length; i += chunkSize) binaryString += String.fromCharCode(...bytes.subarray(i, i + chunkSize));
|
|
52
|
+
return btoa(binaryString);
|
|
77
53
|
}
|
|
54
|
+
export { encodeBase64, loadBytes, toStringOrBytes };
|
package/dist/compare.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function isDeepEqual(a: unknown, b: unknown): boolean;
|
|
1
|
+
export declare function isDeepEqual(a: unknown, b: unknown): boolean;
|
package/dist/compare.js
CHANGED
|
@@ -1,45 +1,26 @@
|
|
|
1
|
-
import { isPlainObject } from
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { isPlainObject } from "./object.js";
|
|
2
|
+
// src/compare.ts
|
|
3
|
+
function isDeepEqual(a, b) {
|
|
4
|
+
return isDeepEqualInternal(a, b, /* @__PURE__ */ new WeakMap());
|
|
4
5
|
}
|
|
5
6
|
function isDeepEqualInternal(a, b, visited) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
if (visitedMatches) {
|
|
26
|
-
visitedMatches.add(b);
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
visited.set(a, new WeakSet([b]));
|
|
30
|
-
}
|
|
31
|
-
const aKeys = Object.keys(aRecord).filter((k) => aRecord[k] !== undefined);
|
|
32
|
-
const bKeys = Object.keys(bRecord).filter((k) => bRecord[k] !== undefined);
|
|
33
|
-
if (aKeys.length !== bKeys.length) {
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
for (const key of aKeys) {
|
|
37
|
-
if (!Object.hasOwn(bRecord, key)) {
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
if (!isDeepEqualInternal(aRecord[key], bRecord[key], visited)) {
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return true;
|
|
7
|
+
if (Object.is(a, b)) return true;
|
|
8
|
+
if (Array.isArray(a)) {
|
|
9
|
+
if (!Array.isArray(b) || a.length !== b.length) return false;
|
|
10
|
+
} else if (!isPlainObject(a) || !isPlainObject(b)) return false;
|
|
11
|
+
const aRecord = a;
|
|
12
|
+
const bRecord = b;
|
|
13
|
+
const visitedMatches = visited.get(a);
|
|
14
|
+
if (visitedMatches?.has(b)) return true;
|
|
15
|
+
if (visitedMatches) visitedMatches.add(b);
|
|
16
|
+
else visited.set(a, new WeakSet([b]));
|
|
17
|
+
const aKeys = Object.keys(aRecord).filter((k) => aRecord[k] !== void 0);
|
|
18
|
+
const bKeys = Object.keys(bRecord).filter((k) => bRecord[k] !== void 0);
|
|
19
|
+
if (aKeys.length !== bKeys.length) return false;
|
|
20
|
+
for (const key of aKeys) {
|
|
21
|
+
if (!Object.hasOwn(bRecord, key)) return false;
|
|
22
|
+
if (!isDeepEqualInternal(aRecord[key], bRecord[key], visited)) return false;
|
|
23
|
+
}
|
|
24
|
+
return true;
|
|
45
25
|
}
|
|
26
|
+
export { isDeepEqual };
|
package/dist/consts.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const ORPC_NAME = "orpc";
|
|
1
|
+
export declare const ORPC_NAME = "orpc";
|
package/dist/consts.js
CHANGED
package/dist/error.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function isAbortError(error: unknown): error is Error;
|
|
1
|
+
export declare function isAbortError(error: unknown): error is Error;
|
package/dist/error.js
CHANGED
package/dist/function.d.ts
CHANGED
|
@@ -9,4 +9,4 @@ export declare function once<T>(fn: () => T): () => T;
|
|
|
9
9
|
* waiting at least `delay` ms when `setTimeout` is available.
|
|
10
10
|
*/
|
|
11
11
|
export declare function defer(callback: () => void, delay?: number): void;
|
|
12
|
-
export declare function tryOrUndefined<T>(fn: () => T): undefined | T;
|
|
12
|
+
export declare function tryOrUndefined<T>(fn: () => T): undefined | T;
|
package/dist/function.js
CHANGED
|
@@ -1,38 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
// src/function.ts
|
|
2
|
+
const AsyncGeneratorFunction = /* @__PURE__ */ (() => Object.getPrototypeOf(async function* () {}).constructor)();
|
|
2
3
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
* Checks whether a value is an async generator function (`async function*`).
|
|
5
|
+
*/
|
|
6
|
+
function isAsyncGeneratorFunction(value) {
|
|
7
|
+
return value instanceof AsyncGeneratorFunction;
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return result;
|
|
17
|
-
};
|
|
9
|
+
function once(fn) {
|
|
10
|
+
let cached;
|
|
11
|
+
return () => {
|
|
12
|
+
if (cached) return cached.result;
|
|
13
|
+
const result = fn();
|
|
14
|
+
cached = { result };
|
|
15
|
+
return result;
|
|
16
|
+
};
|
|
18
17
|
}
|
|
19
18
|
/**
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
void Promise.resolve().then(() => Promise.resolve().then(() => Promise.resolve().then(callback)));
|
|
29
|
-
}
|
|
19
|
+
* Executes the callback function after the current call stack has been cleared,
|
|
20
|
+
* waiting at least `delay` ms when `setTimeout` is available.
|
|
21
|
+
*/
|
|
22
|
+
function defer(callback, delay = 0) {
|
|
23
|
+
if (typeof setTimeout === "function") setTimeout(callback, delay);
|
|
24
|
+
else Promise.resolve().then(() => Promise.resolve().then(() => Promise.resolve().then(callback)));
|
|
30
25
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
26
|
+
function tryOrUndefined(fn) {
|
|
27
|
+
try {
|
|
28
|
+
return fn();
|
|
29
|
+
} catch {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
38
32
|
}
|
|
33
|
+
export { defer, isAsyncGeneratorFunction, once, tryOrUndefined };
|
package/dist/http.d.ts
CHANGED
|
@@ -2,7 +2,35 @@ export declare function pathToHttpPath(path: readonly string[]): `/${string}`;
|
|
|
2
2
|
export declare function normalizeHttpPath(path: string): `/${string}`;
|
|
3
3
|
export declare function mergeHttpPath(a: `/${string}`, b: `/${string}`): `/${string}`;
|
|
4
4
|
export declare function matchesHttpPathPrefix(url: `/${string}`, prefix: `/${string}`): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Removes `prefix` from `pathname`, or returns `undefined` when `pathname` is not under `prefix`.
|
|
7
|
+
* The rest of the path must start at a segment boundary, so `/apis` is not under `/api`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function stripHttpPathPrefix(pathname: `/${string}`, prefix: `/${string}`): `/${string}` | undefined;
|
|
5
10
|
export declare function matchesHttpPath(url: `/${string}`, path: `/${string}`): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Content codings that oRPC compression plugins can encode and decode.
|
|
13
|
+
*/
|
|
14
|
+
declare const COMPRESSION_ENCODINGS: readonly ["gzip", "deflate", "deflate-raw"];
|
|
15
|
+
export type CompressionEncoding = (typeof COMPRESSION_ENCODINGS)[number];
|
|
16
|
+
export declare function isCompressionEncoding(encoding: string): encoding is CompressionEncoding;
|
|
17
|
+
/**
|
|
18
|
+
* Parse Content-Encoding into ordered codings (order applied), ignoring empty list elements.
|
|
19
|
+
*
|
|
20
|
+
* @see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-encoding
|
|
21
|
+
* @see https://www.rfc-editor.org/rfc/rfc9110.html#name-lists-rule-abnf-extension
|
|
22
|
+
*/
|
|
23
|
+
export declare function parseContentEncodings(header: string | undefined): string[];
|
|
24
|
+
/**
|
|
25
|
+
* Roughly estimates the UTF-8 byte length of a string without encoding it.
|
|
26
|
+
*/
|
|
27
|
+
export declare function estimateUtf8ByteLength(value: string): number;
|
|
28
|
+
/**
|
|
29
|
+
* Estimates how many bytes of a FormData body are worth compressing. Non-compressible blobs count
|
|
30
|
+
* against the total. Returns `Infinity` when a compressible blob has an unknown size, and
|
|
31
|
+
* `-Infinity` when a non-compressible one does, since the estimate is then unreliable.
|
|
32
|
+
*/
|
|
33
|
+
export declare function estimateCompressibleFormDataSize(formData: FormData, isCompressible: (contentType: string) => boolean): number;
|
|
6
34
|
/**
|
|
7
35
|
* Parse Accept-Encoding into each coding's q-value, where `0` means the coding is explicitly
|
|
8
36
|
* unacceptable. The `*` wildcard is kept under its own key; use {@link isAcceptableEncoding}
|
|
@@ -27,3 +55,4 @@ export declare function isAcceptableEncoding(qualities: Map<string, number>, cod
|
|
|
27
55
|
export declare function varyByAcceptEncoding(vary: string | undefined): string;
|
|
28
56
|
export declare function isNoTransformCacheControl(cacheControl: string | undefined): boolean;
|
|
29
57
|
export declare function isCompressibleContentType(contentType: string | null | undefined): boolean;
|
|
58
|
+
export {};
|