(meta: I18nMeta)
| 338 | // Converts i18n meta information for a message (id, description, meaning) |
| 339 | // to a JsDoc statement formatted as expected by the Closure compiler. |
| 340 | export function i18nMetaToJSDoc(meta: I18nMeta): o.JSDocComment { |
| 341 | const tags: o.JSDocTag[] = []; |
| 342 | if (meta.description) { |
| 343 | tags.push({tagName: o.JSDocTagName.Desc, text: meta.description}); |
| 344 | } else { |
| 345 | // Suppress the JSCompiler warning that a `@desc` was not given for this message. |
| 346 | tags.push({tagName: o.JSDocTagName.Suppress, text: '{msgDescriptions}'}); |
| 347 | } |
| 348 | if (meta.meaning) { |
| 349 | tags.push({tagName: o.JSDocTagName.Meaning, text: meta.meaning}); |
| 350 | } |
| 351 | return o.jsDocComment(tags); |
| 352 | } |
| 353 | |
| 354 | /** |
| 355 | * Check if the propertyName is a potential event handler. |
no test coverage detected
searching dependent graphs…