Fix mapper used to instantiate distributive conditional manufactured in declaration emit#49737
Merged
weswigham merged 1 commit intomicrosoft:mainfrom Jun 30, 2022
Conversation
…in declaration emit
weswigham
commented
Jun 29, 2022
| const newTypeVariable = factory.createTypeReferenceNode(name); | ||
| context.approximateLength += 37; // 15 each for two added conditionals, 7 for an added infer type | ||
| const newMapper = prependTypeMapping(type.root.checkType, newParam, type.combinedMapper || type.mapper); | ||
| const newMapper = prependTypeMapping(type.root.checkType, newParam, type.mapper); |
Member
Author
There was a problem hiding this comment.
This line's the only one that was needed to fix the related issue - the rest was just nice refactoring I used to make this change evident while debugging.
Member
Author
|
@typescript-bot perf test this just in case - debug only code shouldn't change much, but you never know |
Collaborator
|
Heya @weswigham, I've started to run the perf test suite on this PR at 2615ebe. You can monitor the build here. |
Member
Author
|
@typescript-bot perf test this again since someone canceled the build |
Collaborator
|
Heya @weswigham, I've started to run the perf test suite on this PR at 2615ebe. You can monitor the build here. Update: The results are in! |
Collaborator
|
@weswigham Here they are:
CompilerComparison Report - main..49737
System
Hosts
Scenarios
TSServerComparison Report - main..49737
System
Hosts
Scenarios
Developer Information: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
andrewbranch
approved these changes
Jun 30, 2022
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
And refactor type mapper creation just a tad to give them a nice debug printback for when you're trying to track down issues involving them.
Fixes #49572.