-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Quick FixesEditor-provided fixes, often called code actions.Editor-provided fixes, often called code actions.Fix AvailableA PR has been opened for this issueA PR has been opened for this issue
Milestone
Description
declare let p: Promise<string>;
async function f() {
p.toLowerCase();
}
Available fixes are
- Add await
- Declare method 'toLowerCase'
- Declare property 'toLowerCase'
- Add index signature for property 'toLowerCase'
2–4 modify the Promise
declaration in lib.es5.d.ts
.
I recently suggested to @sandersn that a new codefix shouldn’t change any .d.ts
files, since they’re likely to be downloaded or autogenerated. That may or may not be too aggressive a rule for all codefixes, but I think it may be worth asserting that no codefixes change lib files or node_modules.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Quick FixesEditor-provided fixes, often called code actions.Editor-provided fixes, often called code actions.Fix AvailableA PR has been opened for this issueA PR has been opened for this issue