Unwrap NoInfer-wrapped unions before conditional type distribution attempt#61077
Unwrap NoInfer-wrapped unions before conditional type distribution attempt#61077Andarist wants to merge 5 commits intomicrosoft:mainfrom
NoInfer-wrapped unions before conditional type distribution attempt#61077Conversation
|
@jakebailey could you prepare a playground build for this one? :p |
|
@typescript-bot pack this |
| const newMapper = createTypeMapper(root.outerTypeParameters, typeArguments); | ||
| const checkType = root.checkType; | ||
| let distributionType = root.isDistributive ? getReducedType(getMappedType(checkType, newMapper)) : undefined; | ||
| if (distributionType && isNoInferType(distributionType)) { |
There was a problem hiding this comment.
I have 2 doubts here:
- This still doesn't solve the issue with
A | NoInfer<B | C>. To solve that, it feels likemapTypeWithAliasandmapTypeshould learn how to deal with those NoInfer-wrapped unions - Should the conditional type's result be "repacked" into
NoInferback if needed? 🤔
|
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 |
0737761 to
892d183
Compare
…fore-distribution
|
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 #61076