Improve inference for a tuple target with 2 middle variadic elements and implied arity for the latter#56976
Conversation
…and implied arity for the latter
| inferFromTypes(sliceTupleType(source, startLength, endLength + sourceArity - targetInfo.impliedArity), elementTypes[startLength]); | ||
| inferFromTypes(sliceTupleType(source, startLength + targetInfo.impliedArity, endLength), elementTypes[startLength + 1]); | ||
| } | ||
| else if ((targetInfo = getInferenceInfoForType(elementTypes[startLength + 1]))?.impliedArity !== undefined) { |
There was a problem hiding this comment.
TODO: I might have to limit this to fixed-sized sources or something. This requires more test cases to exercise the improved behavior. It would help me slightly if I'd have a playground with this build - @jakebailey would you mind creating one? :)
…ariadic-elements # Conflicts: # tests/baselines/reference/variadicTuples3.symbols # tests/baselines/reference/variadicTuples3.types # tests/cases/conformance/types/tuple/variadicTuples3.ts
|
@typescript-bot pack this |
|
Hey @jakebailey, I've packed this into an installable tgz. You can install it for testing by referencing it in your and then running There is also a playground for this build and an npm module you can use via |
|
With 6.0 out as the final release vehicle for this codebase, we're closing all PRs that don't fit the merge criteria for post-6.0 patches. If you think this was a mistake and this PR fits the post-6.0 patch criteria, please post to the 6.0 iteration issue with details (specifically, which PR and which patch criteria it satisfies). Next steps for PRs:
|
fixes #56970