Add type definitions

This commit is contained in:
Dolan Miu
2021-09-30 14:52:50 +01:00
parent d51a488303
commit 5a0727f2d9
3 changed files with 33 additions and 5 deletions

View File

@ -1,7 +1,7 @@
// tslint:disable:no-console
import * as fs from "fs";
import * as prompt from "prompt";
import * as shelljs from "shelljs";
import fs from "fs";
import prompt from "prompt";
import shelljs from "shelljs";
console.log("What demo do you wish to run? (Enter a number)");
@ -17,8 +17,8 @@ const schema = {
prompt.start();
prompt.get(schema, (_, result) => {
const demoNumber = result.number;
prompt.get(schema as any, (_, result) => {
const demoNumber = result.number as string;
const files = fs.readdirSync("./demo").filter((fn) => fn.startsWith(demoNumber));
if (files.length === 0) {