mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-14 19:16:17 -06:00
PR feedback
This commit is contained in:
parent
4f404ad92b
commit
1cc973273f
1
src/services/codefixes/fixes.ts
Normal file
1
src/services/codefixes/fixes.ts
Normal file
@ -0,0 +1 @@
|
||||
///<reference path='superFixes.ts' />
|
||||
@ -1,3 +0,0 @@
|
||||
///<reference path='..\services.ts' />
|
||||
///<reference path='codeFixProvider.ts' />
|
||||
///<reference path='superFixes.ts' />
|
||||
@ -24,7 +24,8 @@
|
||||
/// <reference path='transpile.ts' />
|
||||
/// <reference path='formatting\formatting.ts' />
|
||||
/// <reference path='formatting\smartIndenter.ts' />
|
||||
/// <reference path='codefixes\references.ts' />
|
||||
/// <reference path='codefixes\codeFixProvider.ts' />
|
||||
/// <reference path='codefixes\fixes.ts' />
|
||||
|
||||
namespace ts {
|
||||
/** The version of the language service API */
|
||||
@ -1641,15 +1642,18 @@ namespace ts {
|
||||
function getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: string[]): CodeAction[] {
|
||||
synchronizeHostData();
|
||||
const sourceFile = getValidSourceFile(fileName);
|
||||
const span = { start, length: end - start };
|
||||
const newLineChar = getNewLineOrDefaultFromHost(host);
|
||||
|
||||
let allFixes: CodeAction[] = [];
|
||||
|
||||
forEach(errorCodes, error => {
|
||||
const context = {
|
||||
errorCode: error,
|
||||
sourceFile: sourceFile,
|
||||
span: { start, length: end - start },
|
||||
span: span,
|
||||
program: program,
|
||||
newLineCharacter: getNewLineOrDefaultFromHost(host)
|
||||
newLineCharacter: newLineChar
|
||||
};
|
||||
|
||||
const fixes = codefix.getFixes(context);
|
||||
|
||||
@ -80,7 +80,6 @@
|
||||
"formatting/smartIndenter.ts",
|
||||
"formatting/tokenRange.ts",
|
||||
"codeFixes/codeFixProvider.ts",
|
||||
"codeFixes/references.ts",
|
||||
"codeFixes/superFixes.ts"
|
||||
"codeFixes/fixes.ts"
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user