-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Pvb/discover code actions #9304
Conversation
… variables and parameters
easier to change in the future.
let allFixes: CodeFix[] = []; | ||
|
||
forEach(errorCodes, error => { | ||
const fixes = codeFixProvider.getFixes(error, sourceFile, start, end); | ||
const context = new CodeActionContext(error, sourceFile, { start, length: end - start }, checker); |
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.
seems more Javascripty to use an interface instead of a class for CodeActionContext
and say
const context = { error, sourceFile, spec: { start, length: end - start }, checker };
since CodeActionContext doesn't use any class features except the constructor.
…/discoverCodeActions
…nto pvb/discoverCodeActions # Conflicts: # src/harness/fourslash.ts # src/services/quickfixes/quickFixProvider.ts # src/services/services.ts # src/services/tsconfig.json
…into pvb/discoverCodeActions # Conflicts: # src/services/codefixes/references.ts
… fix through text changes
Fix up all the tests
Fixes due to API Changes
I'd like to try this out, is there any way to get a fix to appear outside of the test suite, or manual interactions with the language service protocol? Maybe a branch of VSCode that knows to ask TS lang services for fixes? |
@alexeagle Not yet unfortunately, VS Code is next on my list after I'm done with the VS integration. |
Thanks, I just wrote a small program using the LanguageService to try it On Mon, Jul 18, 2016 at 9:52 AM Paul van Brenk notifications@github.com
|
# Conflicts: # src/services/services.ts
Closing this in favor of more smaller PRs #10185 |
Script side to enable codeaction for error codes, needs Dev15 changes