-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Add TReturn/TNext to Iterable et al #58243
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
ef2e1d9
Add TReturn/TNext to Iterable et al
rbuckton 1a64ac9
Fix assignability checks, update baselines
rbuckton 7aa2281
Fix lint
rbuckton be600a8
Revert incorrect lint fix
rbuckton afbfa69
Merge branch 'main' into iterator-default-return
rbuckton 8182bfc
Fix failing tests
rbuckton ad451d1
Elide type arguments that match defaults for inferred Iterable et al
rbuckton ec82647
Set TReturn default to 'any', provide explicit type arguments where n…
rbuckton 5cb0e10
Fix broken fourslash test
rbuckton 52ed319
Use intrinsic type for builtin iterator return, PR feedback
rbuckton bb513be
Use BuiltinIteratorReturn in es2020.bigint and es2022.intl
rbuckton 2d58aa5
Use BuiltinIteratorReturn in es2020.string and es2020.symbol.wellknown
rbuckton 0bfb236
Update baselines
rbuckton e98303f
Use new --strictBuiltinIteratorReturn flag
rbuckton 3a59acb
Merge branch 'main' into iterator-default-return
rbuckton 8578a4d
Update baselines
rbuckton 51151ee
Change default for 'TNext' to 'any'
rbuckton 595707d
Change inferred return type of generators to 'undefined'
rbuckton 2a4edbc
Revert and use 'void' for BuiltinIteratorReturn
rbuckton 7d32efc
Merge branch 'main' into iterator-default-return
rbuckton db12e2f
Merge branch 'main' into iterator-default-return
rbuckton fe2ff63
Split the difference, only use 'undefined' for built-ins
rbuckton 63bc5fb
Add test and address self-build issue
rbuckton eece783
Merge branch 'main' into iterator-default-return
rbuckton a0d5046
Merge branch 'main' into iterator-default-return
rbuckton 2a6af13
Merge branch 'main' into iterator-default-return
rbuckton 46eba67
Add isolatedDeclarations test
rbuckton b8f04f6
Fix typo in comment
rbuckton 1a3669a
Move initialization of 'typeParameterCount'
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
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
will all generators need to
return undefined
now? do you have an estimate of how much code that breaks?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.
from reading type baselines, it looks like their return type changes to
any
instead ofundefined
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 specifically because this is an implementation of the native
Map<K, V>
interface, which is now specified to returnIterableIterator<T, BuiltinIteratorReturn>
(which isIterableIterator<T, undefined>
under the new flag).