don't transform flow module nodes

This commit is contained in:
Sebastian McKenzie
2015-02-22 22:35:47 +11:00
parent 0b2f1fedcb
commit 5f6808ba92
2 changed files with 9 additions and 0 deletions

View File

@@ -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;

View File

@@ -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) {