don't transform flow module nodes
This commit is contained in:
@@ -5,6 +5,9 @@ var t = require("../../../types");
|
||||
exports.check = require("../internal/modules").check;
|
||||
|
||||
exports.ImportDeclaration = function (node, parent, scope, file) {
|
||||
// flow type
|
||||
if (node.isType) return;
|
||||
|
||||
var nodes = [];
|
||||
|
||||
if (node.specifiers.length) {
|
||||
@@ -24,6 +27,9 @@ exports.ImportDeclaration = function (node, parent, scope, file) {
|
||||
};
|
||||
|
||||
exports.ExportDeclaration = function (node, parent, scope, file) {
|
||||
// flow type
|
||||
if (t.isTypeAlias(node.declaration)) return;
|
||||
|
||||
var nodes = [];
|
||||
var i;
|
||||
|
||||
|
||||
@@ -24,6 +24,9 @@ exports.ImportDeclaration = resolveModuleSource;
|
||||
exports.ExportDeclaration = function (node, parent, scope) {
|
||||
resolveModuleSource.apply(null, arguments);
|
||||
|
||||
// flow type
|
||||
if (node.isType) return;
|
||||
|
||||
var declar = node.declaration;
|
||||
|
||||
if (node.default) {
|
||||
|
||||
Reference in New Issue
Block a user