MCPcopy Create free account
hub / github.com/angular/angular / i18nMetaToJSDoc

Function i18nMetaToJSDoc

packages/compiler/src/render3/view/i18n/meta.ts:324–336  ·  view source on GitHub ↗
(meta: I18nMeta)

Source from the content-addressed store, hash-verified

322// Converts i18n meta information for a message (id, description, meaning)
323// to a JsDoc statement formatted as expected by the Closure compiler.
324export 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.

Callers 2

i18n_spec.tsFile · 0.90

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected