You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Server class defined in index.d.ts does not seem to match the Pretender class in ./src/pretender.ts that it is supposed to represent. It is missing the handledRequests, passthroughRequests, and unhandledRequests properties. There may be more missing types, as I haven't examined every prop closely.
It seems to me that instead of having a separate type definition file that has to stay in sync with the class, it would be better to export the types from the class directly with rollup.
I have a PR ready to go that implements this fix. I'll post it in a few minutes and reference this issue.
The text was updated successfully, but these errors were encountered:
@katehedgpeth I found the same issue as well! I would like to access this.handledRequests for my jest test, but TS is blowing up in my face because the property is not defined on that type. 😢
The Server class defined in
index.d.ts
does not seem to match thePretender
class in./src/pretender.ts
that it is supposed to represent. It is missing thehandledRequests
,passthroughRequests
, andunhandledRequests
properties. There may be more missing types, as I haven't examined every prop closely.It seems to me that instead of having a separate type definition file that has to stay in sync with the class, it would be better to export the types from the class directly with rollup.
I have a PR ready to go that implements this fix. I'll post it in a few minutes and reference this issue.
The text was updated successfully, but these errors were encountered: