(meta: I18nMeta)
| 322 | // Converts i18n meta information for a message (id, description, meaning) |
| 323 | // to a JsDoc statement formatted as expected by the Closure compiler. |
| 324 | export function i18nMetaToJSDoc(meta: I18nMeta): o.JSDocComment { |
| 325 | const tags: o.JSDocTag[] = []; |
| 326 | if (meta.description) { |
| 327 | tags.push({tagName: o.JSDocTagName.Desc, text: meta.description}); |
| 328 | } else { |
| 329 | // Suppress the JSCompiler warning that a `@desc` was not given for this message. |
| 330 | tags.push({tagName: o.JSDocTagName.Suppress, text: '{msgDescriptions}'}); |
| 331 | } |
| 332 | if (meta.meaning) { |
| 333 | tags.push({tagName: o.JSDocTagName.Meaning, text: meta.meaning}); |
| 334 | } |
| 335 | return o.jsDocComment(tags); |
| 336 | } |
| 337 | |
| 338 | /** |
| 339 | * Check if the propertyName is a potential event handler. |
no test coverage detected