MCPcopy Index your code
hub / github.com/angular/angular / asLiteral

Function asLiteral

packages/compiler/src/render3/view/util.ts:53–58  ·  view source on GitHub ↗
(value: any)

Source from the content-addressed store, hash-verified

51}
52
53export function asLiteral(value: any): o.Expression {
54 if (Array.isArray(value)) {
55 return o.literalArr(value.map(asLiteral));
56 }
57 return o.literal(value, o.INFERRED_TYPE);
58}
59
60/**
61 * Serializes inputs and outputs for `defineDirective` and `defineComponent`.

Callers 6

compileQueryFunction · 0.90
baseDirectiveFieldsFunction · 0.90

Calls 2

isArrayMethod · 0.80
mapMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…