-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lock MSW to 0.40.2, and patch it to ignore TS errors
- Loading branch information
1 parent
bb640f8
commit c9838b3
Showing
9 changed files
with
46 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
diff --git a/lib/types/context/set.d.ts b/lib/types/context/set.d.ts | ||
index 266229bad706ec49392b8b87e18560c1566b490d..4fad485f8ffec2db92e808a05ccd9274414a9bd9 100644 | ||
--- a/lib/types/context/set.d.ts | ||
+++ b/lib/types/context/set.d.ts | ||
@@ -15,4 +15,5 @@ export declare type ForbiddenHeaderError<HeaderName extends string> = `SafeRespo | ||
* }) | ||
* @see {@link https://mswjs.io/docs/api/context/set `ctx.set()`} | ||
*/ | ||
+// @ts-ignore | ||
export declare function set<N extends string | HeadersObject>(...args: N extends string ? Lowercase<N> extends ForbiddenHeaderNames ? ForbiddenHeaderError<N> : [N, string] : N extends HeadersObject<infer CookieName> ? Lowercase<CookieName> extends ForbiddenHeaderNames ? ForbiddenHeaderError<CookieName> : [N] : [N]): ResponseTransformer; | ||
diff --git a/lib/types/sharedOptions.d.ts b/lib/types/sharedOptions.d.ts | ||
index d1d6e05df2dc2c29f06d8d0b91c500a10e651a29..3d8c29fd2089b2abf21d78cd277aac9271e781c2 100644 | ||
--- a/lib/types/sharedOptions.d.ts | ||
+++ b/lib/types/sharedOptions.d.ts | ||
@@ -21,4 +21,5 @@ export interface LifeCycleEventsMap<ResponseType> { | ||
'response:bypass': (response: ResponseType, requestId: string) => void; | ||
unhandledException: (error: Error, request: MockedRequest) => void; | ||
} | ||
+// @ts-ignore | ||
export declare type LifeCycleEventEmitter<ResponseType> = Pick<StrictEventEmitter<ResponseType>, 'on' | 'removeListener' | 'removeAllListeners'>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,7 @@ | |
"react-redux": "npm:8.0.2", | ||
"react": "npm:18.1.0", | ||
"react-dom": "npm:18.1.0", | ||
"msw": "0.40.2", | ||
"@types/react": "npm:18.0.12", | ||
"@types/react-dom": "npm:18.0.5", | ||
"@types/inquirer": "npm:8.2.1", | ||
|
@@ -51,7 +52,9 @@ | |
"docs/react": "npm:17.0.2", | ||
"docs/react-dom": "npm:17.0.2", | ||
"docs/@types/react-dom": "npm:17.0.11", | ||
"docs/@types/react": "npm:17.0.11" | ||
"docs/@types/react": "npm:17.0.11", | ||
"type-fest": "2.19.0", | ||
"[email protected]": "patch:msw@npm:0.40.2#.yarn/patches/msw-npm-0.40.2-2107d48752" | ||
}, | ||
"scripts": { | ||
"build": "yarn build:packages", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.