Last change
on this file since bdd6491 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
2.2 KB
|
Line | |
---|
1 | "use strict";
|
---|
2 | /**
|
---|
3 | * @license
|
---|
4 | * Copyright Google LLC All Rights Reserved.
|
---|
5 | *
|
---|
6 | * Use of this source code is governed by an MIT-style license that can be
|
---|
7 | * found in the LICENSE file at https://angular.io/license
|
---|
8 | */
|
---|
9 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
10 | exports.unwrapExpression = void 0;
|
---|
11 | const ts = require("typescript");
|
---|
12 | /**
|
---|
13 | * Unwraps a given expression TypeScript node. Expressions can be wrapped within multiple
|
---|
14 | * parentheses. e.g. "(((({exp}))))()". The function should return the TypeScript node
|
---|
15 | * referring to the inner expression. e.g "exp".
|
---|
16 | */
|
---|
17 | function unwrapExpression(node) {
|
---|
18 | return ts.isParenthesizedExpression(node) ? unwrapExpression(node.expression) : node;
|
---|
19 | }
|
---|
20 | exports.unwrapExpression = unwrapExpression;
|
---|
21 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnVuY3Rpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2Nkay9zY2hlbWF0aWNzL3VwZGF0ZS10b29sL3V0aWxzL2Z1bmN0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7OztHQU1HOzs7QUFFSCxpQ0FBaUM7QUFFakM7Ozs7R0FJRztBQUNILFNBQWdCLGdCQUFnQixDQUFDLElBQThDO0lBQzdFLE9BQU8sRUFBRSxDQUFDLHlCQUF5QixDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQyxnQkFBZ0IsQ0FBQyxJQUFJLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQztBQUN2R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