source: imaps-frontend/node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 1.0 KB
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.isTransparentExprWrapper = isTransparentExprWrapper;
7exports.skipTransparentExprWrapperNodes = skipTransparentExprWrapperNodes;
8exports.skipTransparentExprWrappers = skipTransparentExprWrappers;
9var _t = require("@babel/types");
10const {
11 isParenthesizedExpression,
12 isTSAsExpression,
13 isTSNonNullExpression,
14 isTSSatisfiesExpression,
15 isTSTypeAssertion,
16 isTypeCastExpression
17} = _t;
18function isTransparentExprWrapper(node) {
19 return isTSAsExpression(node) || isTSSatisfiesExpression(node) || isTSTypeAssertion(node) || isTSNonNullExpression(node) || isTypeCastExpression(node) || isParenthesizedExpression(node);
20}
21function skipTransparentExprWrappers(path) {
22 while (isTransparentExprWrapper(path.node)) {
23 path = path.get("expression");
24 }
25 return path;
26}
27function skipTransparentExprWrapperNodes(node) {
28 while (isTransparentExprWrapper(node)) {
29 node = node.expression;
30 }
31 return node;
32}
33
34//# sourceMappingURL=index.js.map
Note: See TracBrowser for help on using the repository browser.