build(tsconfig): add typescript declaration map (#689)

This commit is contained in:
Frazer Smith
2025-09-23 19:41:46 +01:00
committed by GitHub
parent 1d796d9c18
commit a08507902f
4 changed files with 21 additions and 7 deletions
+2 -1
View File
@@ -4,4 +4,5 @@
*
!src/index.js
!src/lib/**
!types/index.d.ts
!types/index.d.ts
!types/index.d.ts.map
+1 -1
View File
@@ -51,7 +51,7 @@
},
"scripts": {
"build:docs": "jsdoc2md src/index.js > API.md --EOL posix",
"build": "tsc",
"build": "tsc -p tsconfig.build.json",
"lint:fix": "npm run lint -- --fix",
"lint:licenses": "licensee --errors-only --production",
"lint:prettier:fix": "prettier . -w -u",
+12
View File
@@ -0,0 +1,12 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "./tsconfig.json",
"compilerOptions": {
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"noEmit": false,
"outDir": "types"
},
"include": ["src/index.js"]
}
+6 -5
View File
@@ -3,14 +3,15 @@
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"declaration": true,
"emitDeclarationOnly": true,
"lib": ["ES2024"],
"module": "NodeNext",
"moduleResolution": "NodeNext",
"outDir": "types",
"noEmit": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"target": "ES2023"
"target": "ES2024",
"types": ["node"]
},
"include": ["src/index.js"]
"exclude": ["dist", "node_modules"]
}