Skip to content

Commit e6c35b3

Browse files
committed
move type declarations out of lib/ subdirectory
now they live next to the files they describe, thanks to rootDir. tsconfig.json seems to be completely ignored and unused here.
1 parent 215c613 commit e6c35b3

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"require": "dist/index.cjs",
88
"default": "dist/index.mjs"
99
},
10-
"types": "dist/lib/index.d.ts",
10+
"types": "dist/index.d.ts",
1111
"scripts": {
1212
"build": "sh -c ./scripts/build.sh",
1313
"lint": "npx @biomejs/biome check lib test",

scripts/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ docker volume rm hash-wasm-volume
3232
# node scripts/optimize
3333
node scripts/make_json
3434
node --max-old-space-size=4096 ./node_modules/rollup/dist/bin/rollup -c
35-
npx tsc ./lib/index --outDir ./dist --downlevelIteration --emitDeclarationOnly --declaration --resolveJsonModule --allowSyntheticDefaultImports
35+
npx tsc ./lib/index --rootDir ./lib --outDir ./dist --downlevelIteration --emitDeclarationOnly --declaration --resolveJsonModule --allowSyntheticDefaultImports
3636

3737
#-s ASSERTIONS=1 \

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"module": "ES6",
55
"lib": ["es2017", "es7", "es6", "dom"],
66
"baseUrl": ".",
7+
"rootDir": "lib",
78
"strict": false,
89
"esModuleInterop": true,
910
"downlevelIteration": true,
@@ -13,4 +14,4 @@
1314
"include": [
1415
"lib",
1516
]
16-
}
17+
}

0 commit comments

Comments
 (0)