-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Adds support for type parameter defaults #13487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
3d3dae0
Adds support for type parameter defaults
rbuckton 442f540
Updated Promise and PromiseLike to use defaults
rbuckton 25cb02e
Fix circularity check, simplify default type mapper
rbuckton ca16ba8
Added comments and additional circularity tests
rbuckton 0b44a2c
Flexible declaration merging
rbuckton 0500065
Avoid inference for fully-supplied type arguments
rbuckton 5ff0f81
Diagnostic message punctuation
rbuckton a2be5e2
Report error using type parameter from merged declaration
rbuckton fd228a9
Remove partial inference
rbuckton 6b2c8cb
Defaults for type aliases
rbuckton 76ba6a7
Merge branch 'master' into genericDefaults
rbuckton 15232fe
Remove circular default check
rbuckton f5f1c7e
Merge branch 'genericDefaults' of https://github.com/Microsoft/TypeSc…
rbuckton febde3f
Revert noConstraintType name change
rbuckton b58ef9e
Merge branch 'master' into genericDefaults
rbuckton 7616e37
Use length() throught checker
rbuckton e001258
Move non-local type parameter check to resolveName
rbuckton 9ba2a6b
Skip type parameters.
rbuckton 6091050
Remove pre-computation of minTypeArgumentCount
rbuckton 6ffcbf5
Merge branch 'master' into genericDefaults
rbuckton 5bb2fe0
Simplify checkTypeParameterListsIdentical
rbuckton 96181c0
Shortcut for class/namespace merge
rbuckton 23216f9
Merge branch 'master' into genericDefaults
rbuckton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Revert noConstraintType name change
- Loading branch information
commit febde3fabc14464de9986f8247997839a59397f9
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a little confusing - so if there were any circular types in a union, you return
undefined
. But you disregard all circularities in an intersection type?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reused this from line 4827, above. It does seem like it should also be performing a comparison against types.length as well, however I am unsure as to whether there was a specific reason for 4827 to ignore circularity in an intersection type.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made this more consistent in 25cb02e and I've added some additional circularity tests in ca16ba8.