@@ -127,7 +127,7 @@ export class GluaApiWriter {
127127 let global = '' ;
128128
129129 if ( func . deprecated )
130- global += `---@deprecated ${ func . deprecated ?? '' } \n` ;
130+ global += `---@deprecated ${ removeNewlines ( func . deprecated ) } \n` ;
131131
132132 global += `${ func . parent } = {}\n\n` ;
133133
@@ -179,7 +179,7 @@ export class GluaApiWriter {
179179 const isContainedInTable = _enum . items [ 0 ] ?. key . includes ( '.' ) ?? false ;
180180
181181 if ( _enum . deprecated )
182- api += `---@deprecated ${ _enum . deprecated ?? '' } \n` ;
182+ api += `---@deprecated ${ removeNewlines ( _enum . deprecated ) } \n` ;
183183
184184 api += `---@enum ${ _enum . name } \n` ;
185185
@@ -193,7 +193,7 @@ export class GluaApiWriter {
193193 } else {
194194 api += item . description ? `${ putCommentBeforeEachLine ( item . description , false ) } \n` : ''
195195 if ( item . deprecated )
196- api += `---@deprecated ${ item . deprecated ?? '' } \n` ;
196+ api += `---@deprecated ${ removeNewlines ( item . deprecated ) } \n` ;
197197 api += `${ key } = ${ item . value } \n` ;
198198 }
199199 } ;
@@ -224,7 +224,7 @@ export class GluaApiWriter {
224224
225225 for ( const field of struct . fields ) {
226226 if ( field . deprecated )
227- fields += `---@deprecated ${ field . deprecated ?? '' } \n` ;
227+ fields += `---@deprecated ${ removeNewlines ( field . deprecated ) } \n` ;
228228
229229 fields += `---${ removeNewlines ( field . description ) . replace ( / \s + / g, ' ' ) } \n` ;
230230
@@ -285,7 +285,7 @@ export class GluaApiWriter {
285285 }
286286
287287 if ( func . deprecated )
288- luaDocComment += `---@deprecated ${ func . deprecated ?? '' } \n` ;
288+ luaDocComment += `---@deprecated ${ removeNewlines ( func . deprecated ) } \n` ;
289289
290290 return luaDocComment ;
291291 }
0 commit comments