msw 2.2.0 → 2.2.1
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/lib/mockServiceWorker.js
CHANGED
package/package.json
CHANGED
|
@@ -75,24 +75,6 @@ export interface StringifiedResponse extends ResponseInit {
|
|
|
75
75
|
body: string | ArrayBuffer | ReadableStream<Uint8Array> | null
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
/**
|
|
79
|
-
* Map of the events that can be sent to the Service Worker
|
|
80
|
-
* only as a part of a single `fetch` event handler.
|
|
81
|
-
*/
|
|
82
|
-
export interface ServiceWorkerFetchEventMap {
|
|
83
|
-
MOCK_RESPONSE(payload: StringifiedResponse): void
|
|
84
|
-
MOCK_RESPONSE_START(payload: StringifiedResponse): void
|
|
85
|
-
|
|
86
|
-
MOCK_NOT_FOUND(): void
|
|
87
|
-
NETWORK_ERROR(payload: { name: string; message: string }): void
|
|
88
|
-
INTERNAL_ERROR(payload: { status: number; body: string }): void
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export interface ServiceWorkerBroadcastChannelMessageMap {
|
|
92
|
-
MOCK_RESPONSE_CHUNK(payload: Uint8Array): void
|
|
93
|
-
MOCK_RESPONSE_END(): void
|
|
94
|
-
}
|
|
95
|
-
|
|
96
78
|
export interface StrictEventListener<EventType extends Event> {
|
|
97
79
|
(event: EventType): void
|
|
98
80
|
}
|