Last change
on this file since 84d0fbb was e29cc2e, checked in by Ema <ema_spirova@…>, 3 years ago |
primeNG components
|
-
Property mode
set to
100644
|
File size:
947 bytes
|
Line | |
---|
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 |
|
---|
10 | var _t = require("@babel/types");
|
---|
11 |
|
---|
12 | const {
|
---|
13 | isParenthesizedExpression,
|
---|
14 | isTSAsExpression,
|
---|
15 | isTSNonNullExpression,
|
---|
16 | isTSTypeAssertion,
|
---|
17 | isTypeCastExpression
|
---|
18 | } = _t;
|
---|
19 |
|
---|
20 | function isTransparentExprWrapper(node) {
|
---|
21 | return isTSAsExpression(node) || isTSTypeAssertion(node) || isTSNonNullExpression(node) || isTypeCastExpression(node) || isParenthesizedExpression(node);
|
---|
22 | }
|
---|
23 |
|
---|
24 | function skipTransparentExprWrappers(path) {
|
---|
25 | while (isTransparentExprWrapper(path.node)) {
|
---|
26 | path = path.get("expression");
|
---|
27 | }
|
---|
28 |
|
---|
29 | return path;
|
---|
30 | }
|
---|
31 |
|
---|
32 | function skipTransparentExprWrapperNodes(node) {
|
---|
33 | while (isTransparentExprWrapper(node)) {
|
---|
34 | node = node.expression;
|
---|
35 | }
|
---|
36 |
|
---|
37 | return node;
|
---|
38 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.