* Only prohibit 'export type' when flow is enabled * Fix lint
This commit is contained in:
committed by
Daniel Tschinder
parent
dcef4012a0
commit
6c4acecf00
@@ -1061,6 +1061,17 @@ export default (superClass: Class<Parser>): Class<Parser> => class extends super
|
||||
|| super.shouldParseExportDeclaration();
|
||||
}
|
||||
|
||||
isExportDefaultSpecifier(): boolean {
|
||||
if (
|
||||
this.match(tt.name) &&
|
||||
(this.state.value === "type" || this.state.value === "interface")
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return super.isExportDefaultSpecifier();
|
||||
}
|
||||
|
||||
parseConditional(expr: N.Expression, noIn: ?boolean, startPos: number, startLoc: Position, refNeedsArrowPos?: Pos): N.Expression {
|
||||
// only do the expensive clone if there is a question mark
|
||||
// and if we come from inside parens
|
||||
|
||||
Reference in New Issue
Block a user