mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 21:06:50 -05:00
Fix #3245: ensure transpile diagnostics only include syntactic and compiler options diagnostics
This commit is contained in:
@@ -10,9 +10,6 @@ module ts {
|
||||
/** The version of the TypeScript compiler release */
|
||||
export const version = "1.5.3";
|
||||
|
||||
const carriageReturnLineFeed = "\r\n";
|
||||
const lineFeed = "\n";
|
||||
|
||||
export function findConfigFile(searchPath: string): string {
|
||||
var fileName = "tsconfig.json";
|
||||
while (true) {
|
||||
@@ -94,10 +91,7 @@ module ts {
|
||||
}
|
||||
}
|
||||
|
||||
let newLine =
|
||||
options.newLine === NewLineKind.CarriageReturnLineFeed ? carriageReturnLineFeed :
|
||||
options.newLine === NewLineKind.LineFeed ? lineFeed :
|
||||
sys.newLine;
|
||||
const newLine = getNewLineCharacter(options);
|
||||
|
||||
return {
|
||||
getSourceFile,
|
||||
@@ -175,6 +169,7 @@ module ts {
|
||||
getGlobalDiagnostics,
|
||||
getSemanticDiagnostics,
|
||||
getDeclarationDiagnostics,
|
||||
getCompilerOptionsDiagnostics,
|
||||
getTypeChecker,
|
||||
getDiagnosticsProducingTypeChecker,
|
||||
getCommonSourceDirectory: () => commonSourceDirectory,
|
||||
@@ -291,6 +286,12 @@ module ts {
|
||||
}
|
||||
}
|
||||
|
||||
function getCompilerOptionsDiagnostics(): Diagnostic[]{
|
||||
let allDiagnostics: Diagnostic[] = [];
|
||||
addRange(allDiagnostics, diagnostics.getGlobalDiagnostics());
|
||||
return sortAndDeduplicateDiagnostics(allDiagnostics);
|
||||
}
|
||||
|
||||
function getGlobalDiagnostics(): Diagnostic[] {
|
||||
let typeChecker = getDiagnosticsProducingTypeChecker();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user