Merge pull request #18810 from Microsoft/unusedErrorArgs

Remove unused arguments for diagnostics
This commit is contained in:
Daniel Rosenwasser 2017-09-28 12:51:57 -07:00 committed by GitHub
commit 0ea7c61eb5
2 changed files with 2 additions and 2 deletions

View file

@ -14573,7 +14573,7 @@ namespace ts {
if (node.expression) { if (node.expression) {
const type = checkExpression(node.expression, checkMode); const type = checkExpression(node.expression, checkMode);
if (node.dotDotDotToken && type !== anyType && !isArrayType(type)) { if (node.dotDotDotToken && type !== anyType && !isArrayType(type)) {
error(node, Diagnostics.JSX_spread_child_must_be_an_array_type, node.toString(), typeToString(type)); error(node, Diagnostics.JSX_spread_child_must_be_an_array_type);
} }
return type; return type;
} }

2
src/compiler/program.ts Normal file → Executable file
View file

@ -1587,7 +1587,7 @@ namespace ts {
fail(Diagnostics.File_0_not_found, fileName); fail(Diagnostics.File_0_not_found, fileName);
} }
else if (refFile && host.getCanonicalFileName(fileName) === host.getCanonicalFileName(refFile.fileName)) { else if (refFile && host.getCanonicalFileName(fileName) === host.getCanonicalFileName(refFile.fileName)) {
fail(Diagnostics.A_file_cannot_have_a_reference_to_itself, fileName); fail(Diagnostics.A_file_cannot_have_a_reference_to_itself);
} }
} }
return sourceFile; return sourceFile;