functions.js 755 B

1234567891011121314151617181920
  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. const ts = require("typescript");
  11. /**
  12. * Unwraps a given expression TypeScript node. Expressions can be wrapped within multiple
  13. * parentheses. e.g. "(((({exp}))))()". The function should return the TypeScript node
  14. * referring to the inner expression. e.g "exp".
  15. */
  16. function unwrapExpression(node) {
  17. return ts.isParenthesizedExpression(node) ? unwrapExpression(node.expression) : node;
  18. }
  19. exports.unwrapExpression = unwrapExpression;
  20. //# sourceMappingURL=functions.js.map