Sha256: 53b782c9c97ff03881706944808c6119f8c286f370d8d65437a09b7e5807e17f
Contents?: true
Size: 995 Bytes
Versions: 63
Compression:
Stored size: 995 Bytes
Contents
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = createTypeAnnotationBasedOnTypeof; var _generated = require("../generated"); function createTypeAnnotationBasedOnTypeof(type) { if (type === "string") { return (0, _generated.stringTypeAnnotation)(); } else if (type === "number") { return (0, _generated.numberTypeAnnotation)(); } else if (type === "undefined") { return (0, _generated.voidTypeAnnotation)(); } else if (type === "boolean") { return (0, _generated.booleanTypeAnnotation)(); } else if (type === "function") { return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function")); } else if (type === "object") { return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object")); } else if (type === "symbol") { return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol")); } else { throw new Error("Invalid typeof value"); } }
Version data entries
63 entries across 62 versions & 12 rubygems