feat: Migrate JavaScript to TypeScript

This commit is contained in:
peaceiris 2019-09-21 06:49:40 +09:00
parent b3cddbe7fa
commit 7b1d8d3b9b
17 changed files with 585 additions and 142 deletions

View file

@ -1,14 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function getOS(platform) {
if (platform === "linux") {
return "Linux";
} else if (platform === "darwin") {
return "macOS";
} else if (platform === "win32") {
return "Windows";
// throw new Error("Windows is not supported");
} else {
throw new Error(`${platform} is not supported`);
}
if (platform === "linux") {
return "Linux";
}
else if (platform === "darwin") {
return "macOS";
}
else if (platform === "win32") {
return "Windows";
// throw new Error("Windows is not supported");
}
else {
throw new Error(`${platform} is not supported`);
}
}
module.exports = getOS;
exports.default = getOS;