Skip to content

Commit 1efb675

Browse files
committed
fix: simply ts config
1 parent f06bf30 commit 1efb675

File tree

4 files changed

+16
-26
lines changed

4 files changed

+16
-26
lines changed

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"author": "Amila Welihinda <[email protected]>",
77
"license": "MIT",
88
"devDependencies": {
9+
"@tsconfig/node16": "^1.0.3",
910
"@types/jest": "^29.4.0",
1011
"@types/node": "^18.13.0",
1112
"@typescript-eslint/eslint-plugin": "^5.51.0",
@@ -24,7 +25,7 @@
2425
"compat": "ts-node ./src/compat.ts",
2526
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
2627
"metadata": "ts-node ./src/metadata.ts",
27-
"preversion": "npm test && npm run compat",
28+
"preversion": "npm test && npm run compat && tsc --project tsconfig.build.json",
2829
"start": "npm run metadata",
2930
"test": "jest && npm run build"
3031
},

tsconfig.build.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"include": ["src/**/*.ts"],
4+
"compilerOptions": {
5+
"noEmit": false,
6+
"declaration": true,
7+
"outDir": "lib"
8+
}
9+
}

tsconfig.json

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,7 @@
11
{
2+
"extends": "@tsconfig/node16",
23
"compilerOptions": {
3-
"target": "ES2018",
4-
"module": "CommonJS",
5-
"lib": ["esnext", "dom"],
6-
"declaration": true,
7-
"declarationMap": true,
8-
"emitDeclarationOnly": true,
9-
"strict": true,
10-
"pretty": true,
11-
"resolveJsonModule": true,
12-
"sourceMap": true,
13-
/* Additional Checks */
14-
"noUnusedLocals": true,
15-
"noUnusedParameters": true,
16-
"noImplicitReturns": true,
17-
"noFallthroughCasesInSwitch": true,
18-
19-
"outDir": "lib",
20-
21-
/* Module Resolution Options */
22-
"moduleResolution": "node",
23-
/* This needs to be false so our types are possible to consume without setting this */
24-
"esModuleInterop": true,
25-
"allowSyntheticDefaultImports": true
26-
},
27-
"exclude": ["lib"]
4+
"noEmit": true,
5+
"resolveJsonModule": true
6+
}
287
}

0 commit comments

Comments
 (0)