mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-13 04:57:55 -06:00
Fix confusing file name in generated diagnostics file (#46821)
* Fix confusing file name in generated diagnostics file * Change "by" to "in"
This commit is contained in:
parent
2d501b1d98
commit
0b9f8b4aa2
@ -41,7 +41,7 @@ function main(): void {
|
||||
const outputFilesDir = path.dirname(inputFilePath);
|
||||
const thisFilePathRel = path.relative(process.cwd(), outputFilesDir);
|
||||
|
||||
const infoFileOutput = buildInfoFileOutput(diagnosticMessages, "./diagnosticInformationMap.generated.ts", thisFilePathRel);
|
||||
const infoFileOutput = buildInfoFileOutput(diagnosticMessages, `./${path.basename(inputFilePath)}`, thisFilePathRel);
|
||||
checkForUniqueCodes(diagnosticMessages);
|
||||
writeFile("diagnosticInformationMap.generated.ts", infoFileOutput);
|
||||
|
||||
@ -62,7 +62,7 @@ function checkForUniqueCodes(diagnosticTable: InputDiagnosticMessageTable) {
|
||||
function buildInfoFileOutput(messageTable: InputDiagnosticMessageTable, inputFilePathRel: string, thisFilePathRel: string): string {
|
||||
let result =
|
||||
"// <auto-generated />\r\n" +
|
||||
"// generated from '" + inputFilePathRel + "' by '" + thisFilePathRel.replace(/\\/g, "/") + "'\r\n" +
|
||||
"// generated from '" + inputFilePathRel + "' in '" + thisFilePathRel.replace(/\\/g, "/") + "'\r\n" +
|
||||
"/* @internal */\r\n" +
|
||||
"namespace ts {\r\n" +
|
||||
" function diag(code: number, category: DiagnosticCategory, key: string, message: string, reportsUnnecessary?: {}, elidedInCompatabilityPyramid?: boolean, reportsDeprecated?: {}): DiagnosticMessage {\r\n" +
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user