no-throw-literal

This commit is contained in:
Alexander T
2019-06-14 10:54:11 +03:00
parent bea1bcb466
commit 12e195c24e
2 changed files with 2 additions and 2 deletions

View File

@@ -18,7 +18,7 @@ function main() {
const [, progName, tscRoot, definitelyTypedRoot] = process.argv;
if (process.argv.length !== 4) {
if (process.argv.length < 2) {
throw "Expected at least 2 argv elements.";
throw new Error("Expected at least 2 argv elements.");
}
console.log("Usage:");
console.log(` node ${path.relative(__dirname, progName)} [TypeScript Repo Root] [DefinitelyTyped Repo Root]`);