Add a tsconfig that works (from mcopy).

This commit is contained in:
mmcwilliams 2019-10-11 17:55:11 -04:00
parent f99290d6ce
commit 70f5834934
2 changed files with 40 additions and 0 deletions

17
src/delay/index.ts Normal file
View File

@ -0,0 +1,17 @@
'use strict';
/**
* Delay in an async/await function
*
* @param {integer} ms Milliseconds to delay for
*
* @returns {Promise} Promise to resolve after timeout
**/
function delay (ms : number) {
return new Promise((resolve : any) => {
return setTimeout(resolve, ms);
});
}
module.exports.delay = delay;

23
tsconfig.json Normal file
View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"esModuleInterop": true,
"target": "ES2017",
"noImplicitAny": true,
"moduleResolution": "node",
"sourceMap": true,
"removeComments" : false,
"baseUrl" : "lib",
"outDir": "./lib/",
"rootDir" : "./src/",
"paths" : {
"log" : ["./lib/log"]
}
},
"exclude" : [
"./app",
"./node_modules",
"./experiments",
"./test"
]
}