Skip to content

Commit a37672f

Browse files
author
hirsch88
committed
refactor tsconfig
1 parent 6d99b92 commit a37672f

File tree

3 files changed

+42
-19
lines changed

3 files changed

+42
-19
lines changed

src/console/lib/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export const askProperties = async (name: string): Promise<any[]> => {
107107

108108
let askAgain = true;
109109
const fieldPrompt = inquirer.createPromptModule();
110-
const properties = [];
110+
const properties: any[] = [];
111111
while (askAgain) {
112112
const property = await fieldPrompt([
113113
{

src/core/IoC.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class IoC {
120120
}
121121

122122
private bindFiles(path: string, target: any, callback: (name: any, value: any) => void): Promise<void> {
123-
return new Promise<void>((resolve, reject) => {
123+
return new Promise<void>((resolve) => {
124124
this.getFiles(path, (files: string[]) => {
125125
files.forEach((file: any) => {
126126
let fileExport, fileClass, fileTarget;

tsconfig.json

Lines changed: 40 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,48 @@
11
{
22
"compilerOptions": {
3-
"module": "commonjs",
4-
"target": "es6",
5-
"moduleResolution": "node",
6-
"sourceMap": true,
7-
"baseUrl": ".",
8-
"outDir": "dist",
9-
"alwaysStrict": true,
10-
"experimentalDecorators": true,
11-
"emitDecoratorMetadata": true,
12-
"importHelpers": true,
13-
"strict": true,
14-
"noImplicitAny": false,
15-
"paths": {
3+
4+
/* Basic Options */
5+
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
6+
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */
7+
"sourceMap": true, /* Generates corresponding '.map' file. */
8+
"outDir": "dist", /* Redirect output structure to the directory. */
9+
"importHelpers": true, /* Import emit helpers from 'tslib'. */
10+
11+
/* Strict Type-Checking Options */
12+
"strict": true, /* Enable all strict type-checking options. */
13+
"noImplicitAny": false, /* Raise error on expressions and declarations with an implied 'any' type. */
14+
"strictNullChecks": true, /* Enable strict null checks. */
15+
"noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
16+
"alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
17+
18+
/* Additional Checks */
19+
"noUnusedLocals": true, /* Report errors on unused locals. */
20+
"noUnusedParameters": false, /* Report errors on unused parameters. */
21+
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
22+
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
23+
24+
/* Module Resolution Options */
25+
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
26+
"baseUrl": "./", /* Base directory to resolve non-absolute module names. */
27+
"paths": { /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
1628
"*": [
17-
"node_modules/*",
18-
"src/types/*"
29+
"./node_modules/*",
30+
"./src/types/*"
1931
]
20-
}
32+
},
33+
"rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
34+
"typeRoots": [ /* List of folders to include type definitions from. */
35+
"./src/types"
36+
],
37+
"types": [ /* Type declaration files to be included in compilation. */
38+
],
39+
"allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
40+
41+
/* Experimental Options */
42+
"experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
43+
"emitDecoratorMetadata": true /* Enables experimental support for emitting type metadata for decorators. */
2144
},
2245
"include": [
23-
"src/**/*"
46+
"./src/**/*"
2447
]
2548
}

0 commit comments

Comments
 (0)