undici-types 6.19.6 → 6.20.0

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/eventsource.d.ts CHANGED
@@ -2,8 +2,6 @@ import { MessageEvent, ErrorEvent } from './websocket'
2
2
  import Dispatcher from './dispatcher'
3
3
 
4
4
  import {
5
- EventTarget,
6
- Event,
7
5
  EventListenerOptions,
8
6
  AddEventListenerOptions,
9
7
  EventListenerOrEventListenerObject
package/filereader.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /// <reference types="node" />
2
2
 
3
3
  import { Blob } from 'buffer'
4
- import { DOMException, Event, EventInit, EventTarget } from './patch'
4
+ import { DOMException, EventInit } from './patch'
5
5
 
6
6
  export declare class FileReader {
7
7
  __proto__: EventTarget & FileReader
package/interceptors.d.ts CHANGED
@@ -7,9 +7,11 @@ declare namespace Interceptors {
7
7
  export type DumpInterceptorOpts = { maxSize?: number }
8
8
  export type RetryInterceptorOpts = RetryHandler.RetryOptions
9
9
  export type RedirectInterceptorOpts = { maxRedirections?: number }
10
-
10
+ export type ResponseErrorInterceptorOpts = { throwOnError: boolean }
11
+
11
12
  export function createRedirectInterceptor(opts: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
12
13
  export function dump(opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
13
14
  export function retry(opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
14
15
  export function redirect(opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
16
+ export function responseError(opts?: ResponseErrorInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
15
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "undici-types",
3
- "version": "6.19.6",
3
+ "version": "6.20.0",
4
4
  "description": "A stand-alone types package for Undici",
5
5
  "homepage": "https://undici.nodejs.org",
6
6
  "bugs": {
package/patch.d.ts CHANGED
@@ -6,44 +6,6 @@ export type DOMException = typeof globalThis extends { DOMException: infer T }
6
6
  ? T
7
7
  : any
8
8
 
9
- export type EventTarget = typeof globalThis extends { EventTarget: infer T }
10
- ? T
11
- : {
12
- addEventListener(
13
- type: string,
14
- listener: any,
15
- options?: any,
16
- ): void
17
- dispatchEvent(event: Event): boolean
18
- removeEventListener(
19
- type: string,
20
- listener: any,
21
- options?: any | boolean,
22
- ): void
23
- }
24
-
25
- export type Event = typeof globalThis extends { Event: infer T }
26
- ? T
27
- : {
28
- readonly bubbles: boolean
29
- cancelBubble: () => void
30
- readonly cancelable: boolean
31
- readonly composed: boolean
32
- composedPath(): [EventTarget?]
33
- readonly currentTarget: EventTarget | null
34
- readonly defaultPrevented: boolean
35
- readonly eventPhase: 0 | 2
36
- readonly isTrusted: boolean
37
- preventDefault(): void
38
- returnValue: boolean
39
- readonly srcElement: EventTarget | null
40
- stopImmediatePropagation(): void
41
- stopPropagation(): void
42
- readonly target: EventTarget | null
43
- readonly timeStamp: number
44
- readonly type: string
45
- }
46
-
47
9
  export interface EventInit {
48
10
  bubbles?: boolean
49
11
  cancelable?: boolean
package/websocket.d.ts CHANGED
@@ -3,8 +3,6 @@
3
3
  import type { Blob } from 'buffer'
4
4
  import type { MessagePort } from 'worker_threads'
5
5
  import {
6
- EventTarget,
7
- Event,
8
6
  EventInit,
9
7
  EventListenerOptions,
10
8
  AddEventListenerOptions,