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
Argument of type '(request: FakeXMLHttpRequest & ExtraRequestData) => [number, {}, string]' is not assignable to parameter of type 'ResponseHandler'.
Type '(request: FakeXMLHttpRequest & ExtraRequestData) => [number, {}, string]' is missing the following properties from type 'ResponseHandler': async, numberOfCallsts(2345)
The extra attributes that were introduced on the handler instance (async and numberOfCalls) are also mandatory to provide when defining the mock itself - which I think is not intended, these are meant to be (readonly) properties, correct?
For now the following workaround seems to make TS happy - but it's not very ideal:
With the rewrite to TypeScript, the API as described in the README does not work in TypeScript projects.
The following:
fails with the following TS error:
The extra attributes that were introduced on the handler instance (
async
andnumberOfCalls
) are also mandatory to provide when defining the mock itself - which I think is not intended, these are meant to be (readonly) properties, correct?For now the following workaround seems to make TS happy - but it's not very ideal:
The text was updated successfully, but these errors were encountered: