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

Function unwrapWritableSignal

packages/compiler/src/typecheck/ops/expression.ts:41–47  ·  view source on GitHub ↗
(expression: TcbExpr, tcb: Context)

Source from the content-addressed store, hash-verified

39 * Wraps an expression in an `unwrapSignal` call which extracts the signal's value.
40 */
41export function unwrapWritableSignal(expression: TcbExpr, tcb: Context): TcbExpr {
42 const unwrapRef = tcb.env.referenceExternalSymbol(
43 R3Identifiers.unwrapWritableSignal.moduleName,
44 R3Identifiers.unwrapWritableSignal.name,
45 );
46 return new TcbExpr(`${unwrapRef.print()}(${expression.print()})`);
47}
48
49/**
50 * A `TcbOp` which renders an Angular expression (e.g. `{{foo() && bar.baz}}`).

Callers 3

executeMethod · 0.90
tcbCallTypeCtorFunction · 0.90

Calls 2

printMethod · 0.45

Tested by

no test coverage detected