diff --git a/src/babel/types/flow.js b/src/babel/types/flow.js index 3793ef39de..ea813ae0ef 100644 --- a/src/babel/types/flow.js +++ b/src/babel/types/flow.js @@ -112,5 +112,9 @@ export function createTypeAnnotationBasedOnTypeof(type) { return t.genericTypeAnnotation(t.identifier("Function")); } else if (type === "object") { return t.genericTypeAnnotation(t.identifier("Object")); + } else if (type === "symbol") { + return t.genericTypeAnnotation(t.identifier("Symbol")); + } else { + throw new Error("Invalid typeof value"); } }