Fix type definitions in exports

…and generate `.d.cts` files for CommonJS exports.
This commit is contained in:
Andrew Dupont 2025-02-20 00:34:47 -08:00 committed by ObserverOfTime
parent 876d5a96bf
commit 02fff92b91
5 changed files with 1118 additions and 16 deletions

View file

@ -1,12 +1,14 @@
import { createBundle } from 'dts-buddy';
await createBundle({
project: 'tsconfig.json',
output: 'web-tree-sitter.d.ts',
modules: {
'web-tree-sitter': 'src/index.ts'
},
compilerOptions: {
stripInternal: true,
},
});
for (let ext of ['ts', 'cts']) {
await createBundle({
project: 'tsconfig.json',
output: `web-tree-sitter.d.${ext}`,
modules: {
'web-tree-sitter': 'src/index.ts'
},
compilerOptions: {
stripInternal: true,
},
});
}