-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Infer rest type without using assignContextualParameterTypes #49740
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
4 commits
Select commit
Hold shift + click to select a range
36937c7
Add failing test with temporary name
jakebailey 25bdb8a
Infer rest type without using assignContextualParameterTypes
jakebailey 3ab0071
Rename test
jakebailey a475c5c
Move code out of inferFromAnnotatedParameters, undo bad changes
jakebailey 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
Infer rest type without using assignContextualParameterTypes
- Loading branch information
commit 25bdb8a68709b4443a96fd044f9913e145f71e12
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| //// [issue49383.ts] | ||
| function wrap<Args extends unknown[]>(_: (...args: Args) => void) {} | ||
| wrap(({ cancelable } = {}) => {}); | ||
|
|
||
|
|
||
| //// [issue49383.js] | ||
| function wrap(_) { } | ||
| wrap(function (_a) { | ||
| var _b = _a === void 0 ? {} : _a, cancelable = _b.cancelable; | ||
| }); |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| === tests/cases/compiler/issue49383.ts === | ||
| function wrap<Args extends unknown[]>(_: (...args: Args) => void) {} | ||
| >wrap : Symbol(wrap, Decl(issue49383.ts, 0, 0)) | ||
| >Args : Symbol(Args, Decl(issue49383.ts, 0, 14)) | ||
| >_ : Symbol(_, Decl(issue49383.ts, 0, 38)) | ||
| >args : Symbol(args, Decl(issue49383.ts, 0, 42)) | ||
| >Args : Symbol(Args, Decl(issue49383.ts, 0, 14)) | ||
|
|
||
| wrap(({ cancelable } = {}) => {}); | ||
| >wrap : Symbol(wrap, Decl(issue49383.ts, 0, 0)) | ||
| >cancelable : Symbol(cancelable, Decl(issue49383.ts, 1, 7)) | ||
|
|
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| === tests/cases/compiler/issue49383.ts === | ||
| function wrap<Args extends unknown[]>(_: (...args: Args) => void) {} | ||
| >wrap : <Args extends unknown[]>(_: (...args: Args) => void) => void | ||
| >_ : (...args: Args) => void | ||
| >args : Args | ||
|
|
||
| wrap(({ cancelable } = {}) => {}); | ||
| >wrap(({ cancelable } = {}) => {}) : void | ||
| >wrap : <Args extends unknown[]>(_: (...args: Args) => void) => void | ||
| >({ cancelable } = {}) => {} : ({ cancelable }?: { cancelable: any; }) => void | ||
| >cancelable : any | ||
| >{} : {} | ||
|
|
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.
Uh oh!
There was an error while loading. Please reload this page.