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

Function getSource

packages/compiler/test/expression_parser/parser_spec.ts:822–822  ·  view source on GitHub ↗
(span: ParseSpan)

Source from the content-addressed store, hash-verified

820 const ast = parseBinding('{one: 1, two: "the number two", three, "four": 4, ...five}');
821 const literal = ast.ast as LiteralMap;
822 const getSource = (span: ParseSpan) => ast.source?.substring(span.start, span.end);
823
824 expect(getSource(literal.keys[0].span)).toBe('one');
825 expect(getSource(literal.keys[1].span)).toBe('two');

Callers 1

parser_spec.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected