Add importKind to ImportDeclaration in babel/types
This commit is contained in:
parent
4ba998c5db
commit
b6300a0869
@ -322,6 +322,11 @@ defineType("ImportDeclaration", {
|
|||||||
source: {
|
source: {
|
||||||
validate: assertNodeType("StringLiteral"),
|
validate: assertNodeType("StringLiteral"),
|
||||||
},
|
},
|
||||||
|
importKind: {
|
||||||
|
// Handle Flowtype's extension "import {typeof foo} from"
|
||||||
|
validate: assertOneOf("type", "typeof", "value"),
|
||||||
|
optional: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -357,7 +362,8 @@ defineType("ImportSpecifier", {
|
|||||||
},
|
},
|
||||||
importKind: {
|
importKind: {
|
||||||
// Handle Flowtype's extension "import {typeof foo} from"
|
// Handle Flowtype's extension "import {typeof foo} from"
|
||||||
validate: assertOneOf(null, "type", "typeof"),
|
validate: assertOneOf("type", "typeof"),
|
||||||
|
optional: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user