mphttpx 1.0.3 → 1.0.5

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/index.d.ts CHANGED
@@ -13,17 +13,15 @@ declare const TextEncoderE: {
13
13
  prototype: TextEncoder;
14
14
  };
15
15
 
16
- declare const state$h: unique symbol;
17
16
  declare class TextDecoderP implements TextDecoder {
18
17
  constructor(utfLabel?: string, { fatal, ignoreBOM }?: {
19
18
  fatal?: boolean | undefined;
20
19
  ignoreBOM?: boolean | undefined;
21
20
  });
22
- [state$h]: TextDecoderState;
23
21
  get encoding(): string;
24
22
  get fatal(): boolean;
25
23
  get ignoreBOM(): boolean;
26
- decode(buffer?: TAllowSharedBufferSource, { stream }?: {
24
+ decode(buffer?: Parameters<TextDecoder["decode"]>[0], { stream }?: {
27
25
  stream?: boolean | undefined;
28
26
  }): string;
29
27
  toString(): string;
@@ -32,29 +30,17 @@ declare class TextDecoderP implements TextDecoder {
32
30
  hierarchy: string[];
33
31
  };
34
32
  }
35
- declare const _bomSeen: unique symbol;
36
- declare const _partial: unique symbol;
37
- declare class TextDecoderState {
38
- fatal: boolean;
39
- ignoreBOM: boolean;
40
- [_bomSeen]: boolean;
41
- [_partial]: number[];
42
- }
43
- type TAllowSharedBufferSource = NonNullable<Parameters<TextDecoder["decode"]>[0]>;
44
33
  declare const TextDecoderE: {
45
34
  new (label?: string, options?: TextDecoderOptions): TextDecoder;
46
35
  prototype: TextDecoder;
47
36
  };
48
37
 
49
- declare const state$g: unique symbol;
50
-
51
38
  declare class EventP implements Event {
52
- static readonly NONE = 0;
53
- static readonly CAPTURING_PHASE = 1;
54
- static readonly AT_TARGET = 2;
55
- static readonly BUBBLING_PHASE = 3;
39
+ static readonly NONE: 0;
40
+ static readonly CAPTURING_PHASE: 1;
41
+ static readonly AT_TARGET: 2;
42
+ static readonly BUBBLING_PHASE: 3;
56
43
  constructor(type: string, eventInitDict?: EventInit);
57
- [state$g]: EventState;
58
44
  get type(): string;
59
45
  get bubbles(): boolean;
60
46
  get cancelable(): boolean;
@@ -62,17 +48,17 @@ declare class EventP implements Event {
62
48
  get target(): EventTarget | null;
63
49
  get currentTarget(): EventTarget | null;
64
50
  get eventPhase(): number;
65
- readonly NONE = 0;
66
- readonly CAPTURING_PHASE = 1;
67
- readonly AT_TARGET = 2;
68
- readonly BUBBLING_PHASE = 3;
51
+ readonly NONE: 0;
52
+ readonly CAPTURING_PHASE: 1;
53
+ readonly AT_TARGET: 2;
54
+ readonly BUBBLING_PHASE: 3;
69
55
  get srcElement(): EventTarget | null;
70
56
  get cancelBubble(): boolean;
71
57
  set cancelBubble(value: boolean);
72
58
  get defaultPrevented(): boolean;
73
59
  get returnValue(): boolean;
74
60
  set returnValue(value: boolean);
75
- get isTrusted(): boolean;
61
+ readonly isTrusted: boolean;
76
62
  get timeStamp(): number;
77
63
  composedPath(): EventTarget[];
78
64
  initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
@@ -85,31 +71,6 @@ declare class EventP implements Event {
85
71
  hierarchy: string[];
86
72
  };
87
73
  }
88
- declare const _TimeStamp: unique symbol;
89
- declare const _isTrusted: unique symbol;
90
- declare const _passive: unique symbol;
91
- declare const _dispatched: unique symbol;
92
- declare const _preventDefaultCalled: unique symbol;
93
- declare const _stopImmediatePropagationCalled: unique symbol;
94
- declare class EventState {
95
- static [_TimeStamp]: number;
96
- type: string;
97
- bubbles: boolean;
98
- cancelable: boolean;
99
- composed: boolean;
100
- target: EventTarget | null;
101
- currentTarget: EventTarget | null;
102
- eventPhase: number;
103
- cancelBubble: boolean;
104
- defaultPrevented: boolean;
105
- returnValue: boolean;
106
- timeStamp: number;
107
- [_isTrusted]: boolean;
108
- [_passive]: boolean;
109
- [_dispatched]: boolean;
110
- [_preventDefaultCalled]: boolean;
111
- [_stopImmediatePropagationCalled]: boolean;
112
- }
113
74
  declare const EventE: {
114
75
  new (type: string, eventInitDict?: EventInit): Event;
115
76
  prototype: Event;
@@ -119,11 +80,8 @@ declare const EventE: {
119
80
  readonly BUBBLING_PHASE: 3;
120
81
  };
121
82
 
122
- declare const state$f: unique symbol;
123
-
124
83
  declare class EventTargetP implements EventTarget {
125
84
  constructor();
126
- [state$f]: EventTargetState;
127
85
  addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
128
86
  dispatchEvent(event: Event): boolean;
129
87
  removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
@@ -133,28 +91,13 @@ declare class EventTargetP implements EventTarget {
133
91
  hierarchy: string[];
134
92
  };
135
93
  }
136
- declare const _executors: unique symbol;
137
- declare class EventTargetState {
138
- constructor(target: EventTargetP);
139
- target: EventTargetP;
140
- [_executors]: Executor[];
141
- }
142
- declare class Executor {
143
- constructor(type: string, callback: EventListenerOrEventListenerObject | null);
144
- type: string;
145
- callback: EventListener | null;
146
- options: AddEventListenerOptions;
147
- equals(executor: Executor): boolean;
148
- }
149
94
  declare const EventTargetE: {
150
95
  new (): EventTarget;
151
96
  prototype: EventTarget;
152
97
  };
153
98
 
154
- declare const state$e: unique symbol;
155
99
  declare class CustomEventP<T> extends EventP implements CustomEvent {
156
100
  constructor(type: string, eventInitDict?: CustomEventInit<T>);
157
- [state$e]: CustomEventState;
158
101
  get detail(): T;
159
102
  initCustomEvent(type: string, bubbles?: boolean, cancelable?: boolean, detail?: T): void;
160
103
  toString(): string;
@@ -163,18 +106,13 @@ declare class CustomEventP<T> extends EventP implements CustomEvent {
163
106
  hierarchy: string[];
164
107
  };
165
108
  }
166
- declare class CustomEventState {
167
- detail: unknown;
168
- }
169
109
  declare const CustomEventE: {
170
110
  new <T>(type: string, eventInitDict?: CustomEventInit<T>): CustomEvent<T>;
171
111
  prototype: CustomEvent;
172
112
  };
173
113
 
174
- declare const state$d: unique symbol;
175
114
  declare class ProgressEventP extends EventP implements ProgressEvent {
176
115
  constructor(type: string, eventInitDict?: ProgressEventInit);
177
- [state$d]: ProgressEventState;
178
116
  get lengthComputable(): boolean;
179
117
  get loaded(): number;
180
118
  get total(): number;
@@ -184,27 +122,19 @@ declare class ProgressEventP extends EventP implements ProgressEvent {
184
122
  hierarchy: string[];
185
123
  };
186
124
  }
187
- declare class ProgressEventState {
188
- lengthComputable: boolean | (() => boolean);
189
- loaded: number | (() => number);
190
- total: number | (() => number);
191
- }
192
125
  declare const ProgressEventE: {
193
126
  new (type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
194
127
  prototype: ProgressEvent;
195
128
  };
196
129
 
197
- declare const state$c: unique symbol;
198
-
199
130
  declare class BlobP implements Blob {
200
131
  constructor(blobParts?: BlobPart[], options?: BlobPropertyBag);
201
- [state$c]: BlobState;
202
132
  get size(): number;
203
133
  get type(): string;
204
134
  arrayBuffer(): Promise<ArrayBuffer>;
205
- bytes(): Promise<TUint8ArrayOfArrayBuffer>;
135
+ bytes(): Promise<Uint8Array<ArrayBuffer>>;
206
136
  slice(start?: number, end?: number, contentType?: string): Blob;
207
- stream(): ReadableStream<TUint8ArrayOfArrayBuffer>;
137
+ stream(): ReturnType<Blob["stream"]>;
208
138
  text(): Promise<string>;
209
139
  toString(): string;
210
140
  get isPolyfill(): {
@@ -212,23 +142,13 @@ declare class BlobP implements Blob {
212
142
  hierarchy: string[];
213
143
  };
214
144
  }
215
- declare const _u8array: unique symbol;
216
- declare class BlobState {
217
- constructor(buffer: TUint8ArrayOfArrayBuffer);
218
- size: number;
219
- type: string;
220
- [_u8array]: TUint8ArrayOfArrayBuffer;
221
- }
222
- type TUint8ArrayOfArrayBuffer = ReturnType<TextEncoder["encode"]>;
223
145
  declare const BlobE: {
224
146
  new (blobParts?: BlobPart[], options?: BlobPropertyBag): Blob;
225
147
  prototype: Blob;
226
148
  };
227
149
 
228
- declare const state$b: unique symbol;
229
150
  declare class FileP extends BlobP implements File {
230
151
  constructor(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag);
231
- [state$b]: FileState;
232
152
  get lastModified(): number;
233
153
  get name(): string;
234
154
  get webkitRelativePath(): string;
@@ -238,33 +158,27 @@ declare class FileP extends BlobP implements File {
238
158
  hierarchy: string[];
239
159
  };
240
160
  }
241
- declare class FileState {
242
- lastModified: number;
243
- name: string;
244
- }
245
161
  declare const FileE: {
246
162
  new (fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
247
163
  prototype: File;
248
164
  };
249
165
 
250
- declare const state$a: unique symbol;
251
166
  declare class FileReaderP extends EventTargetP implements FileReader {
252
- static readonly EMPTY = 0;
253
- static readonly LOADING = 1;
254
- static readonly DONE = 2;
167
+ static readonly EMPTY: 0;
168
+ static readonly LOADING: 1;
169
+ static readonly DONE: 2;
255
170
  constructor();
256
- [state$a]: FileReaderState;
257
171
  get readyState(): 0 | 1 | 2;
258
172
  get result(): string | ArrayBuffer | null;
259
- readonly EMPTY = 0;
260
- readonly LOADING = 1;
261
- readonly DONE = 2;
173
+ readonly EMPTY: 0;
174
+ readonly LOADING: 1;
175
+ readonly DONE: 2;
262
176
  get error(): DOMException | null;
263
177
  abort(): void;
264
- readAsArrayBuffer: (blob: Blob) => void;
265
- readAsBinaryString: (blob: Blob) => void;
266
- readAsDataURL: (blob: Blob) => void;
267
- readAsText: (blob: Blob, encoding?: string) => void;
178
+ readAsArrayBuffer(blob: Blob): void;
179
+ readAsBinaryString(blob: Blob): void;
180
+ readAsDataURL(blob: Blob): void;
181
+ readAsText(blob: Blob, encoding?: string): void;
268
182
  get onabort(): ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
269
183
  set onabort(value: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null);
270
184
  get onerror(): ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
@@ -283,28 +197,6 @@ declare class FileReaderP extends EventTargetP implements FileReader {
283
197
  hierarchy: string[];
284
198
  };
285
199
  }
286
- declare const _handlers$3: unique symbol;
287
- declare class FileReaderState {
288
- constructor(target: FileReaderP);
289
- target: FileReaderP;
290
- readyState: FileReader["readyState"];
291
- result: string | ArrayBuffer | null;
292
- error: DOMException | null;
293
- [_handlers$3]: {
294
- onabort: (ev: ProgressEvent<FileReader>) => void;
295
- onerror: (ev: ProgressEvent<FileReader>) => void;
296
- onload: (ev: ProgressEvent<FileReader>) => void;
297
- onloadend: (ev: ProgressEvent<FileReader>) => void;
298
- onloadstart: (ev: ProgressEvent<FileReader>) => void;
299
- onprogress: (ev: ProgressEvent<FileReader>) => void;
300
- };
301
- onabort: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
302
- onerror: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
303
- onload: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
304
- onloadend: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
305
- onloadstart: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
306
- onprogress: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
307
- }
308
200
  declare const FileReaderE: {
309
201
  new (): FileReader;
310
202
  prototype: FileReader;
@@ -313,11 +205,8 @@ declare const FileReaderE: {
313
205
  readonly DONE: 2;
314
206
  };
315
207
 
316
- declare const state$9: unique symbol;
317
-
318
208
  declare class FormDataP implements FormData {
319
209
  constructor(form?: HTMLFormElement, submitter?: HTMLElement | null);
320
- [state$9]: FormDataState;
321
210
  append(name: string, value: string | Blob, filename?: string): void;
322
211
  delete(name: string): void;
323
212
  get(name: string): FormDataEntryValue | null;
@@ -335,20 +224,13 @@ declare class FormDataP implements FormData {
335
224
  hierarchy: string[];
336
225
  };
337
226
  }
338
- declare const _formData: unique symbol;
339
- declare class FormDataState {
340
- [_formData]: [string, FormDataEntryValue][];
341
- toBlob(): BlobP;
342
- }
343
227
  declare const FormDataE: {
344
228
  new (form?: HTMLFormElement, submitter?: HTMLElement | null): FormData;
345
229
  prototype: FormData;
346
230
  };
347
231
 
348
- declare const state$8: unique symbol;
349
232
  declare class URLSearchParamsP implements URLSearchParams {
350
233
  constructor(init?: string[][] | Record<string, string> | string | URLSearchParams);
351
- [state$8]: URLSearchParamsState;
352
234
  get size(): number;
353
235
  append(name: string, value: string): void;
354
236
  delete(name: string, value?: string): void;
@@ -368,23 +250,16 @@ declare class URLSearchParamsP implements URLSearchParams {
368
250
  hierarchy: string[];
369
251
  };
370
252
  }
371
- declare const _urlspDict: unique symbol;
372
- declare class URLSearchParamsState {
373
- [_urlspDict]: Record<string, string[]>;
374
- }
375
253
  declare const URLSearchParamsE: {
376
254
  new (init?: string[][] | Record<string, string> | string | URLSearchParams): URLSearchParams;
377
255
  prototype: URLSearchParams;
378
256
  };
379
257
 
380
- declare const state$7: unique symbol;
381
-
382
258
  declare class AbortSignalP extends EventTargetP implements AbortSignal {
383
259
  static abort(reason?: any): AbortSignal;
384
260
  static any(signals: AbortSignal[]): AbortSignal;
385
261
  static timeout(milliseconds: number): AbortSignal;
386
262
  constructor();
387
- [state$7]: AbortSignalState;
388
263
  get aborted(): boolean;
389
264
  get reason(): any;
390
265
  throwIfAborted(): void;
@@ -396,17 +271,6 @@ declare class AbortSignalP extends EventTargetP implements AbortSignal {
396
271
  hierarchy: string[];
397
272
  };
398
273
  }
399
- declare const _handlers$2: unique symbol;
400
- declare class AbortSignalState {
401
- constructor(target: AbortSignalP);
402
- target: AbortSignalP;
403
- aborted: boolean;
404
- reason: any;
405
- [_handlers$2]: {
406
- onabort: (ev: Event) => void;
407
- };
408
- onabort: ((this: AbortSignal, ev: Event) => any) | null;
409
- }
410
274
  declare const AbortSignalE: {
411
275
  new (): AbortSignal;
412
276
  prototype: AbortSignal;
@@ -415,10 +279,8 @@ declare const AbortSignalE: {
415
279
  timeout(milliseconds: number): AbortSignal;
416
280
  };
417
281
 
418
- declare const state$6: unique symbol;
419
282
  declare class AbortControllerP implements AbortController {
420
283
  constructor();
421
- [state$6]: AbortControllerState;
422
284
  get signal(): AbortSignal;
423
285
  abort(reason?: any): void;
424
286
  toString(): string;
@@ -427,19 +289,13 @@ declare class AbortControllerP implements AbortController {
427
289
  hierarchy: string[];
428
290
  };
429
291
  }
430
- declare class AbortControllerState {
431
- signal: AbortSignalP;
432
- }
433
292
  declare const AbortControllerE: {
434
293
  new (): AbortController;
435
294
  prototype: AbortController;
436
295
  };
437
296
 
438
- declare const state$5: unique symbol;
439
-
440
297
  declare class XMLHttpRequestEventTargetP extends EventTargetP implements XMLHttpRequestEventTarget {
441
298
  constructor();
442
- [state$5]: XMLHttpRequestEventTargetState;
443
299
  get onabort(): ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
444
300
  set onabort(value: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null);
445
301
  get onerror(): ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
@@ -460,96 +316,19 @@ declare class XMLHttpRequestEventTargetP extends EventTargetP implements XMLHttp
460
316
  hierarchy: string[];
461
317
  };
462
318
  }
463
- declare const _handlers$1: unique symbol;
464
- declare class XMLHttpRequestEventTargetState {
465
- /**
466
- * @param _target XMLHttpRequestEventTargetP
467
- */
468
- constructor(_target: unknown);
469
- target: XMLHttpRequest;
470
- [_handlers$1]: {
471
- onabort: (ev: ProgressEvent) => void;
472
- onerror: (ev: ProgressEvent) => void;
473
- onload: (ev: ProgressEvent) => void;
474
- onloadend: (ev: ProgressEvent) => void;
475
- onloadstart: (ev: ProgressEvent) => void;
476
- onprogress: (ev: ProgressEvent) => void;
477
- ontimeout: (ev: ProgressEvent) => void;
478
- };
479
- onabort: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
480
- onerror: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
481
- onload: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
482
- onloadend: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
483
- onloadstart: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
484
- onprogress: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
485
- ontimeout: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
486
- }
487
-
488
- declare class XMLHttpRequestUploadP extends XMLHttpRequestEventTargetP implements XMLHttpRequestUpload {
489
- constructor();
490
- toString(): string;
491
- get isPolyfill(): {
492
- symbol: symbol;
493
- hierarchy: string[];
494
- };
495
- }
496
-
497
- interface IRequestTask {
498
- /**
499
- * 中断请求任务
500
- */
501
- abort: () => void;
502
- /**
503
- * 监听 HTTP Response Header 事件。会比请求完成事件更早
504
- */
505
- onHeadersReceived: (listener: (res: {
506
- /**
507
- * 开发者服务器返回的 HTTP Response Header
508
- */
509
- header: object;
510
- /**
511
- * 开发者服务器返回的 HTTP 状态码 (目前开发者工具上不会返回 statusCode 字段,可用真机查看该字段,后续将会支持)
512
- */
513
- statusCode: number;
514
- /**
515
- * 开发者服务器返回的 cookies,格式为字符串数组
516
- */
517
- cookies: string[];
518
- }) => void) => void;
519
- /**
520
- * 移除 HTTP Response Header 事件的监听函数
521
- */
522
- offHeadersReceived: (listener: Function) => void;
523
- /**
524
- * 监听 Transfer-Encoding Chunk Received 事件。当接收到新的chunk时触发。
525
- */
526
- onChunkReceived: (listener: (res: {
527
- /**
528
- * 返回的chunk buffer
529
- */
530
- data: ArrayBuffer;
531
- }) => void) => void;
532
- /**
533
- * 移除 Transfer-Encoding Chunk Received 事件的监听函数
534
- */
535
- offChunkReceived: (listener: Function) => void;
536
- }
537
-
538
- declare const state$4: unique symbol;
539
319
 
540
320
  declare class XMLHttpRequestP extends XMLHttpRequestEventTargetP implements XMLHttpRequest {
541
- static readonly UNSENT = 0;
542
- static readonly OPENED = 1;
543
- static readonly HEADERS_RECEIVED = 2;
544
- static readonly LOADING = 3;
545
- static readonly DONE = 4;
321
+ static readonly UNSENT: 0;
322
+ static readonly OPENED: 1;
323
+ static readonly HEADERS_RECEIVED: 2;
324
+ static readonly LOADING: 3;
325
+ static readonly DONE: 4;
546
326
  constructor();
547
- [state$4]: XMLHttpRequestState;
548
- readonly UNSENT = 0;
549
- readonly OPENED = 1;
550
- readonly HEADERS_RECEIVED = 2;
551
- readonly LOADING = 3;
552
- readonly DONE = 4;
327
+ readonly UNSENT: 0;
328
+ readonly OPENED: 1;
329
+ readonly HEADERS_RECEIVED: 2;
330
+ readonly LOADING: 3;
331
+ readonly DONE: 4;
553
332
  get readyState(): number;
554
333
  get response(): any;
555
334
  get responseText(): string;
@@ -579,42 +358,6 @@ declare class XMLHttpRequestP extends XMLHttpRequestEventTargetP implements XMLH
579
358
  hierarchy: string[];
580
359
  };
581
360
  }
582
- declare const _handlers: unique symbol;
583
- declare const _inAfterOpenBeforeSend: unique symbol;
584
- declare const _resetPending: unique symbol;
585
- declare const _timeoutId: unique symbol;
586
- declare const _requestURL: unique symbol;
587
- declare const _method: unique symbol;
588
- declare const _requestHeaders: unique symbol;
589
- declare const _responseHeaders: unique symbol;
590
- declare const _responseContentLength: unique symbol;
591
- declare const _requestTask: unique symbol;
592
- declare class XMLHttpRequestState {
593
- constructor(target: XMLHttpRequestP);
594
- target: XMLHttpRequestP;
595
- readyState: number;
596
- response: any;
597
- responseType: XMLHttpRequestResponseType;
598
- responseURL: string;
599
- status: number;
600
- statusText: string;
601
- timeout: number;
602
- upload: XMLHttpRequestUploadP;
603
- withCredentials: boolean;
604
- [_handlers]: {
605
- onreadystatechange: (ev: Event) => void;
606
- };
607
- onreadystatechange: ((this: XMLHttpRequest, ev: Event) => any) | null;
608
- [_inAfterOpenBeforeSend]: boolean;
609
- [_resetPending]: boolean;
610
- [_timeoutId]: number;
611
- [_requestURL]: string;
612
- [_method]: string;
613
- [_requestHeaders]: Record<string, string>;
614
- [_responseHeaders]: Record<string, string> | null;
615
- [_responseContentLength]: number | (() => number);
616
- [_requestTask]: IRequestTask | null;
617
- }
618
361
  declare const XMLHttpRequestE: {
619
362
  new (): XMLHttpRequest;
620
363
  prototype: XMLHttpRequest;
@@ -628,10 +371,8 @@ declare const XMLHttpRequestE: {
628
371
  declare function fetchP(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
629
372
  declare const fetchE: typeof fetch;
630
373
 
631
- declare const state$3: unique symbol;
632
374
  declare class HeadersP implements Headers {
633
375
  constructor(init?: HeadersInit);
634
- [state$3]: HeadersState;
635
376
  append(name: string, value: string): void;
636
377
  delete(name: string): void;
637
378
  get(name: string): string | null;
@@ -649,25 +390,18 @@ declare class HeadersP implements Headers {
649
390
  hierarchy: string[];
650
391
  };
651
392
  }
652
- declare const _headersMap: unique symbol;
653
- declare class HeadersState {
654
- [_headersMap]: Map<string, [string, string]>;
655
- }
656
393
  declare const HeadersE: {
657
394
  new (init?: HeadersInit): Headers;
658
395
  prototype: Headers;
659
396
  };
660
397
 
661
- declare const state$2: unique symbol;
662
-
663
398
  declare class BodyP implements Body {
664
399
  constructor();
665
- [state$2]: BodyState;
666
- get body(): ReadableStream<TUint8ArrayOfArrayBuffer> | null;
400
+ get body(): Body["body"];
667
401
  get bodyUsed(): boolean;
668
402
  arrayBuffer(): Promise<ArrayBuffer>;
669
403
  blob(): Promise<Blob>;
670
- bytes(): Promise<TUint8ArrayOfArrayBuffer>;
404
+ bytes(): Promise<Uint8Array<ArrayBuffer>>;
671
405
  formData(): Promise<FormData>;
672
406
  json(): Promise<any>;
673
407
  text(): Promise<string>;
@@ -677,18 +411,9 @@ declare class BodyP implements Body {
677
411
  hierarchy: string[];
678
412
  };
679
413
  }
680
- declare const _name: unique symbol;
681
- declare const _body: unique symbol;
682
- declare class BodyState {
683
- bodyUsed: boolean;
684
- [_name]: string;
685
- [_body]: string | ArrayBuffer;
686
- }
687
414
 
688
- declare const state$1: unique symbol;
689
415
  declare class RequestP extends BodyP implements Request {
690
416
  constructor(input: RequestInfo | URL, init?: RequestInit);
691
- [state$1]: RequestState;
692
417
  get cache(): RequestCache;
693
418
  get credentials(): RequestCredentials;
694
419
  get destination(): RequestDestination;
@@ -709,31 +434,13 @@ declare class RequestP extends BodyP implements Request {
709
434
  hierarchy: string[];
710
435
  };
711
436
  }
712
- declare class RequestState {
713
- cache: RequestCache;
714
- credentials: RequestCredentials;
715
- destination: RequestDestination;
716
- headers?: Headers;
717
- integrity: string;
718
- keepalive: boolean;
719
- method: string;
720
- mode: RequestMode;
721
- redirect: RequestRedirect;
722
- referrer: string;
723
- referrerPolicy: ReferrerPolicy;
724
- signal?: AbortSignal;
725
- url: string;
726
- }
727
437
  declare const RequestE: {
728
438
  new (input: RequestInfo | URL, init?: RequestInit): Request;
729
439
  prototype: Request;
730
440
  };
731
441
 
732
- declare const state: unique symbol;
733
-
734
442
  declare class ResponseP extends BodyP implements Response {
735
443
  constructor(body?: BodyInit | null, init?: ResponseInit);
736
- [state]: ResponseState;
737
444
  get headers(): Headers;
738
445
  get ok(): boolean;
739
446
  get redirected(): boolean;
@@ -751,15 +458,6 @@ declare class ResponseP extends BodyP implements Response {
751
458
  hierarchy: string[];
752
459
  };
753
460
  }
754
- declare class ResponseState {
755
- headers?: Headers;
756
- ok: boolean;
757
- redirected: boolean;
758
- status: number;
759
- statusText: string;
760
- type: ResponseType;
761
- url: string;
762
- }
763
461
  declare const ResponseE: {
764
462
  new (body?: BodyInit | null, init?: ResponseInit): Response;
765
463
  prototype: Response;