summaryrefslogtreecommitdiff
path: root/node_modules/@babel/traverse/lib/path/inference/util.js
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2023-10-14 15:31:11 +0800
committerlittleblack111 <littleblack11111@gmail.com>2023-10-14 15:31:11 +0800
commitaa773172311dcada759dfbaac485f4bc6e00bc21 (patch)
treeca6d9a5eff3ab8f689f9acb4f0df791d9486813d /node_modules/@babel/traverse/lib/path/inference/util.js
parentc5a5384e846f242e901e859fe600d695d8990a9a (diff)
added babel
Diffstat (limited to 'node_modules/@babel/traverse/lib/path/inference/util.js')
-rw-r--r--node_modules/@babel/traverse/lib/path/inference/util.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/node_modules/@babel/traverse/lib/path/inference/util.js b/node_modules/@babel/traverse/lib/path/inference/util.js
new file mode 100644
index 00000000..5017e20b
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/path/inference/util.js
@@ -0,0 +1,30 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.createUnionType = createUnionType;
+var _t = require("@babel/types");
+const {
+ createFlowUnionType,
+ createTSUnionType,
+ createUnionTypeAnnotation,
+ isFlowType,
+ isTSType
+} = _t;
+function createUnionType(types) {
+ {
+ if (isFlowType(types[0])) {
+ if (createFlowUnionType) {
+ return createFlowUnionType(types);
+ }
+ return createUnionTypeAnnotation(types);
+ } else {
+ if (createTSUnionType) {
+ return createTSUnionType(types);
+ }
+ }
+ }
+}
+
+//# sourceMappingURL=util.js.map