functions.js 756 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.dev/license
  8. */
  9. Object.defineProperty(exports, "__esModule", { value: true });
  10. exports.unwrapExpression = unwrapExpression;
  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. //# sourceMappingURL=functions.js.map