Is it possible to provide a minimal custom HTTPHandler with TypeScript? #1917
-
Hey there! 👋 I'm trying to extending the RequestHandler to add some extra properties on the class but I'm struggling with the typing. Is it possible to provide me a minimal example of a custom handler like the one https://mswjs.io/docs/api/request-handler#properties with the proper types?
Out of topic but the extra property I want to add is the mock associated to the handler. Is it possible to get it without going through a custom handler perhaps? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I would look at the typings applied for |
Beta Was this translation helpful? Give feedback.
msw/src/core/handlers/HttpHandler.ts
Lines 59 to 63 in c27c320