Convert FunctionTypeAnnotation to any to not crash

master v0.3.2-pre
Vitaliy Filippov 2019-05-23 23:53:32 +03:00
parent 870756a440
commit ec681fe6fc
1 changed files with 1 additions and 1 deletions

View File

@ -141,7 +141,7 @@ function makeType(ctx: Context, node: FlowTypeAnnotation): ?Type {
case 'MixedTypeAnnotation':
return t.createMixed();
case 'FunctionTypeAnnotation':
return null;
return t.createAny();
default:
invariant(false, `Unknown node: ${node.type}`);
}