PR feedback

This commit is contained in:
Paul van Brenk 2016-10-04 17:37:46 -07:00
parent 4f404ad92b
commit 1cc973273f
4 changed files with 9 additions and 8 deletions

View File

@ -0,0 +1 @@
///<reference path='superFixes.ts' />

View File

@ -1,3 +0,0 @@
///<reference path='..\services.ts' />
///<reference path='codeFixProvider.ts' />
///<reference path='superFixes.ts' />

View File

@ -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);

View File

@ -80,7 +80,6 @@
"formatting/smartIndenter.ts",
"formatting/tokenRange.ts",
"codeFixes/codeFixProvider.ts",
"codeFixes/references.ts",
"codeFixes/superFixes.ts"
"codeFixes/fixes.ts"
]
}