Repository navigation
test: fix type errors from the @types/node 26 assert overloads - #29
Merged
Merged
Conversation
commit: |
Member
|
Thanks, Éverton! Much appreciated. |
Member
|
🚀 This pull request is included in v6.0.5. See Release 6.0.5 for release notes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Since the dev dependency update in 306bef4,
pnpm test:typesfails on main, so the build job fails for every pull request.@types/node26 splits themessageparameter ofassert.okandassert.equalinto two overloads: an optionalErroror message function, and a requiredstring. With@types/node24.19.2 the same files typecheck.test/positions.test.ts:aanditemare passed toassert.okinside the loop that declares them, and resolving the overload now feeds back into their inferred type (TS7022). They are annotated with the element types ofCommand["prefix"]andCase["items"].test/substitution-boundaries.test.ts:result.stderr || result.error?.messageisstring | undefined, which matches neither overload. The message now falls back to the exit status.Only these three test lines change.
pnpm test:types, lint, formatting and the Node 24 suite (2,145 tests) pass.