From 05efae1c584b1b54bda7c8a88b31ad5695f4108f Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Thu, 25 Jun 2015 22:55:25 +0100 Subject: [PATCH] complete t.createTypeAnnotationBasedOnTypeof --- src/babel/types/flow.js | 4 ++++ 1 file changed, 4 insertions(+) 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"); } }