utilium 1.2.1 → 1.2.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/requests.d.ts +9 -2
- package/package.json +1 -1
- package/src/requests.ts +2 -2
package/dist/requests.d.ts
CHANGED
@@ -13,10 +13,18 @@ export interface ResourceCacheOptions {
|
|
13
13
|
*/
|
14
14
|
regionGapThreshold?: number;
|
15
15
|
}
|
16
|
-
type CacheRange = {
|
16
|
+
export type CacheRange = {
|
17
17
|
start: number;
|
18
18
|
end: number;
|
19
19
|
};
|
20
|
+
export interface CacheRegion {
|
21
|
+
/** The region's offset from the start of the resource */
|
22
|
+
offset: number;
|
23
|
+
/** Ranges cached in this region. These are absolute! */
|
24
|
+
ranges: CacheRange[];
|
25
|
+
/** Data for this region */
|
26
|
+
data: Uint8Array;
|
27
|
+
}
|
20
28
|
export type RequestError = {
|
21
29
|
tag: 'status';
|
22
30
|
response: Response;
|
@@ -55,4 +63,3 @@ export declare function getCached(url: string, options: RequestOptions): {
|
|
55
63
|
data: Uint8Array;
|
56
64
|
missing: CacheRange[];
|
57
65
|
};
|
58
|
-
export {};
|
package/package.json
CHANGED
package/src/requests.ts
CHANGED
@@ -21,9 +21,9 @@ export interface ResourceCacheOptions {
|
|
21
21
|
regionGapThreshold?: number;
|
22
22
|
}
|
23
23
|
|
24
|
-
type CacheRange = { start: number; end: number };
|
24
|
+
export type CacheRange = { start: number; end: number };
|
25
25
|
|
26
|
-
interface CacheRegion {
|
26
|
+
export interface CacheRegion {
|
27
27
|
/** The region's offset from the start of the resource */
|
28
28
|
offset: number;
|
29
29
|
|