complete t.createTypeAnnotationBasedOnTypeof

This commit is contained in:
Sebastian McKenzie 2015-06-25 22:55:25 +01:00
parent c08fff4b44
commit 05efae1c58

View File

@ -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");
}
}