Pete Bacon Darwin 12c925a000 refactor(compiler): consolidate wrapReference() (#41080)
This function is declared in multiple places. The instances inside
`compiler` are slightly different to those in `compiler-cli`. So this
commit consolidates them into two reusable functions.

PR Close #41080
2021-03-15 13:26:51 -07:00

14 lines
455 B
TypeScript

/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {R3Reference} from '@angular/compiler';
import * as o from '@angular/compiler/src/output/output_ast';
export function wrapReference<TExpression>(wrapped: o.WrappedNodeExpr<TExpression>): R3Reference {
return {value: wrapped, type: wrapped};
}