Last change
on this file since 76712b2 was e29cc2e, checked in by Ema <ema_spirova@…>, 3 years ago |
primeNG components
|
-
Property mode
set to
100644
|
File size:
947 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | "use strict";
|
---|
| 2 |
|
---|
| 3 | Object.defineProperty(exports, "__esModule", {
|
---|
| 4 | value: true
|
---|
| 5 | });
|
---|
| 6 | exports.isTransparentExprWrapper = isTransparentExprWrapper;
|
---|
[e29cc2e] | 7 | exports.skipTransparentExprWrapperNodes = skipTransparentExprWrapperNodes;
|
---|
[6a3a178] | 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;
|
---|
[e29cc2e] | 30 | }
|
---|
| 31 |
|
---|
| 32 | function skipTransparentExprWrapperNodes(node) {
|
---|
| 33 | while (isTransparentExprWrapper(node)) {
|
---|
| 34 | node = node.expression;
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | return node;
|
---|
[6a3a178] | 38 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.