Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Canceled after 0s
32 lines
1.0 KiB
Plaintext
32 lines
1.0 KiB
Plaintext
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = void 0;
|
|
var _index = require("../generated/index.js");
|
|
var _default = exports.default = createTypeAnnotationBasedOnTypeof;
|
|
function createTypeAnnotationBasedOnTypeof(type) {
|
|
switch (type) {
|
|
case "string":
|
|
return (0, _index.stringTypeAnnotation)();
|
|
case "number":
|
|
return (0, _index.numberTypeAnnotation)();
|
|
case "undefined":
|
|
return (0, _index.voidTypeAnnotation)();
|
|
case "boolean":
|
|
return (0, _index.booleanTypeAnnotation)();
|
|
case "function":
|
|
return (0, _index.genericTypeAnnotation)((0, _index.identifier)("Function"));
|
|
case "object":
|
|
return (0, _index.genericTypeAnnotation)((0, _index.identifier)("Object"));
|
|
case "symbol":
|
|
return (0, _index.genericTypeAnnotation)((0, _index.identifier)("Symbol"));
|
|
case "bigint":
|
|
return (0, _index.anyTypeAnnotation)();
|
|
}
|
|
throw new Error("Invalid typeof value: " + type);
|
|
}
|
|
|
|
//# sourceMappingURL=createTypeAnnotationBasedOnTypeof.js.map
|