@@ -62,20 +62,20 @@ function buildInfoFileOutput(messageTable: InputDiagnosticMessageTable, inputFil
62
62
let result =
63
63
"// <auto-generated />\r\n" +
64
64
"// generated from '" + inputFilePathRel + "' by '" + thisFilePathRel . replace ( / \\ / g, "/" ) + "'\r\n" +
65
- "/* @internal */ \r\n" +
66
- "namespace ts { \r\n" +
67
- " function diag(code: number, category: DiagnosticCategory, key: string, message: string, reportsUnnecessary?: {}, elidedInCompatabilityPyramid?: boolean): DiagnosticMessage {\r\n" +
68
- " return { code, category, key, message, reportsUnnecessary, elidedInCompatabilityPyramid };\r\n" +
69
- " }\r\n" +
70
- " export const Diagnostics = {\r\n" ;
65
+ "\r\n" +
66
+ "import { DiagnosticCategory, DiagnosticMessage } from \"./ts\"; \r\n" +
67
+ "function diag(code: number, category: DiagnosticCategory, key: string, message: string, reportsUnnecessary?: {}, elidedInCompatabilityPyramid?: boolean): DiagnosticMessage {\r\n" +
68
+ " return { code, category, key, message, reportsUnnecessary, elidedInCompatabilityPyramid };\r\n" +
69
+ "}\r\n" +
70
+ "export const Diagnostics = {\r\n" ;
71
71
messageTable . forEach ( ( { code, category, reportsUnnecessary, elidedInCompatabilityPyramid } , name ) => {
72
72
const propName = convertPropertyName ( name ) ;
73
73
const argReportsUnnecessary = reportsUnnecessary ? `, /*reportsUnnecessary*/ ${ reportsUnnecessary } ` : "" ;
74
74
const argElidedInCompatabilityPyramid = elidedInCompatabilityPyramid ? `${ ! reportsUnnecessary ? ", /*reportsUnnecessary*/ undefined" : "" } , /*elidedInCompatabilityPyramid*/ ${ elidedInCompatabilityPyramid } ` : "" ;
75
- result += ` ${ propName } : diag(${ code } , DiagnosticCategory.${ category } , "${ createKey ( propName , code ) } ", ${ JSON . stringify ( name ) } ${ argReportsUnnecessary } ${ argElidedInCompatabilityPyramid } ),\r\n` ;
75
+ result += ` ${ propName } : diag(${ code } , DiagnosticCategory.${ category } , "${ createKey ( propName , code ) } ", ${ JSON . stringify ( name ) } ${ argReportsUnnecessary } ${ argElidedInCompatabilityPyramid } ),\r\n` ;
76
76
} ) ;
77
77
78
- result += " };\r\n} " ;
78
+ result += "}; " ;
79
79
80
80
return result ;
81
81
}
0 commit comments