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
Typescript error with V2 wrap: Type '{ data: WhatEverType; }' is missing the following properties from type 'CallableRequest<any>': rawRequest, acceptsStreaming #257
Typescript error with V2 `wrap` Type '{ data: WhatEverTypeMyParameterTypeIs; }' is missing the following properties from type 'CallableRequest<any>': rawRequest, acceptsStreaming
It is indeed a usecase to set rawRequest sometimes in the wrapped request, e.g. if you want to fake some parameters of the request.
So I think that the wrapped function parameter should be typed Partial<CallableRequest<any>>.
Ideally, it should infer the request object any from the original CallableFunction definition so it is typed Partial<CallableRequest<WhatEverTypeMyParameterTypeIs>>.
Even better, the then optional rawRequest property should also be a Partial<Request> so we can only provide the values we need for a test.