main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Rev | Line | |
---|
[79a0317] | 1 | "use strict";
|
---|
| 2 |
|
---|
| 3 | Object.defineProperty(exports, "__esModule", {
|
---|
| 4 | value: true
|
---|
| 5 | });
|
---|
| 6 | exports.isTransparentExprWrapper = isTransparentExprWrapper;
|
---|
| 7 | exports.skipTransparentExprWrapperNodes = skipTransparentExprWrapperNodes;
|
---|
| 8 | exports.skipTransparentExprWrappers = skipTransparentExprWrappers;
|
---|
| 9 | var _t = require("@babel/types");
|
---|
| 10 | const {
|
---|
| 11 | isParenthesizedExpression,
|
---|
| 12 | isTSAsExpression,
|
---|
| 13 | isTSNonNullExpression,
|
---|
| 14 | isTSSatisfiesExpression,
|
---|
| 15 | isTSTypeAssertion,
|
---|
| 16 | isTypeCastExpression
|
---|
| 17 | } = _t;
|
---|
| 18 | function isTransparentExprWrapper(node) {
|
---|
| 19 | return isTSAsExpression(node) || isTSSatisfiesExpression(node) || isTSTypeAssertion(node) || isTSNonNullExpression(node) || isTypeCastExpression(node) || isParenthesizedExpression(node);
|
---|
| 20 | }
|
---|
| 21 | function skipTransparentExprWrappers(path) {
|
---|
| 22 | while (isTransparentExprWrapper(path.node)) {
|
---|
| 23 | path = path.get("expression");
|
---|
| 24 | }
|
---|
| 25 | return path;
|
---|
| 26 | }
|
---|
| 27 | function 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.