Merge pull request #18810 from Microsoft/unusedErrorArgs
Remove unused arguments for diagnostics
This commit is contained in:
commit
0ea7c61eb5
|
@ -14573,7 +14573,7 @@ namespace ts {
|
|||
if (node.expression) {
|
||||
const type = checkExpression(node.expression, checkMode);
|
||||
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;
|
||||
}
|
||||
|
|
2
src/compiler/program.ts
Normal file → Executable file
2
src/compiler/program.ts
Normal file → Executable file
|
@ -1587,7 +1587,7 @@ namespace ts {
|
|||
fail(Diagnostics.File_0_not_found, 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;
|
||||
|
|
Loading…
Reference in a new issue