changeDetectionCheckToConst function

Expression changeDetectionCheckToConst(
  1. String name
)

Converts value of a ChangeDetectionStrategy to refer to the static field.

Otherwise the generated code refers to arbitrary integer values.

Implementation

o.Expression changeDetectionCheckToConst(String name) {
  return o.importExpr(CompileIdentifierMetadata(
    name: 'ChangeDetectionCheckedState.$name',
    moduleUrl: Identifiers.changeDetectionCheckedState.moduleUrl,
  ));
}