@@ -88,20 +88,12 @@ function buildInfoFileOutput(messageTable, inputFilePathRel) {
88
88
"" ,
89
89
"import { DiagnosticCategory, DiagnosticMessage } from \"./types\";" ,
90
90
"" ,
91
- "function diag(code: number, category: DiagnosticCategory, key: string, message: string, reportsUnnecessary?: {}, elidedInCompatabilityPyramid?: boolean, reportsDeprecated?: {}): DiagnosticMessage {" ,
92
- " return { code, category, key, message, reportsUnnecessary, elidedInCompatabilityPyramid, reportsDeprecated };" ,
93
- "}" ,
94
- "" ,
95
91
"/** @internal */" ,
96
92
"export const Diagnostics = {" ,
97
93
] ;
98
94
messageTable . forEach ( ( { code, category, reportsUnnecessary, elidedInCompatabilityPyramid, reportsDeprecated } , name ) => {
99
95
const propName = convertPropertyName ( name ) ;
100
- const argReportsUnnecessary = reportsUnnecessary ? `, /*reportsUnnecessary*/ ${ reportsUnnecessary } ` : "" ;
101
- const argElidedInCompatabilityPyramid = elidedInCompatabilityPyramid ? `${ ! reportsUnnecessary ? ", /*reportsUnnecessary*/ undefined" : "" } , /*elidedInCompatabilityPyramid*/ ${ elidedInCompatabilityPyramid } ` : "" ;
102
- const argReportsDeprecated = reportsDeprecated ? `${ ! argElidedInCompatabilityPyramid ? ", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ undefined" : "" } , /*reportsDeprecated*/ ${ reportsDeprecated } ` : "" ;
103
-
104
- result . push ( ` ${ propName } : diag(${ code } , DiagnosticCategory.${ category } , "${ createKey ( propName , code ) } ", ${ JSON . stringify ( name ) } ${ argReportsUnnecessary } ${ argElidedInCompatabilityPyramid } ${ argReportsDeprecated } ),` ) ;
96
+ result . push ( ` ${ propName } : { code: ${ code } , category: DiagnosticCategory.${ category } , key: "${ createKey ( propName , code ) } ", message: ${ JSON . stringify ( name ) } , reportsUnnecessary: ${ reportsUnnecessary } , elidedInCompatabilityPyramid: ${ elidedInCompatabilityPyramid } , reportsDeprecated: ${ reportsDeprecated } } satisfies DiagnosticMessage as DiagnosticMessage,` ) ;
105
97
} ) ;
106
98
107
99
result . push ( "};" ) ;
0 commit comments