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
{{ message }}
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.
This corrects the type definition for requestFragment, which does not match it's implementation. This resolveszalando#327 and supercedes https://github.com/zalando/tailor/pull/297/files.
This also correct initialisation of custom `requestFragment` functions, which otherwise are not invoked to close over `filterHeaders`.
The type definition for
requestFragment
does not match the implementation.It is a single function that takes 5 arguments and returns a promise.
tailor/index.d.ts
Line 42 in 7283c2f
However, the implementation is a function that takes a single argument, and returns a function that takes 4 arguments and returns a promise.
tailor/lib/request-fragment.js
Lines 26 to 32 in 571b6d5
The response type is
ServerResponse
, but inon('response', response => ...)
is anIncomingMessage
tailor/lib/request-fragment.js
Lines 54 to 60 in 7283c2f
Argument
url
is an attribute from the tag, and therefore astring
, not an instantiatedURL
object.https://github.com/atkinchris/tailor/blob/3123dc4d182aef299e7ec1385005cbcf1368134b/lib/fragment.js#L116-L118
I think the correct type definition should be:
The text was updated successfully, but these errors were encountered: