Typescript fixes & minor cleanup #894
Open
+132
−271
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@ts-ignore
and@ts-expect-errors
string
as the type. This also fixes the type errors in the tests.Check
test withCheck - Cast
that checks the non encoded versionCheck - String
test which checks the encoded versionunknown
withstring | Blob
to correctly fix the typesforceErrorEncapsulation: true
from thehandle-error
test as this option is no longer validerror
test check for thepath
in the error to narrow the type as ValidationError can return two very different types.@ts-expect-error
in theresponse
test. Unsure why, code looks spec correct.DOM
andDOM.Iterable
to thetsconfig.json
. These are required forheaders.keys()
(DOM) andheaders.getAll()
(DOM.Iterable). Do note though thatheaders.getAll()
has been removed from the spec and is deprecated. It doesn't exist in the node only types anymore.All tests pass.
Hope this helps, I wanted to try work on a few things I've needed but had to fix a few types in the process so thought I'd submit them separately first.