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

Function isStringLiteralArray

packages/localize/tools/src/source_file_utils.ts:394–398  ·  view source on GitHub ↗
(
  node: t.Node,
)

Source from the content-addressed store, hash-verified

392 * @param node The node to test.
393 */
394export function isStringLiteralArray(
395 node: t.Node,
396): node is t.Expression & {elements: t.StringLiteral[]} {
397 return t.isArrayExpression(node) && node.elements.every((element) => t.isStringLiteral(element));
398}
399
400/**
401 * Are all the given `nodes` expressions?

Callers 2

unwrapStringLiteralArrayFunction · 0.85

Calls 1

isStringLiteralMethod · 0.80

Tested by

no test coverage detected