feat: add type dts and apiKeyObject

This commit is contained in:
2024-07-01 01:02:35 +08:00
parent f3c0707666
commit 9d4a4947e7
9 changed files with 509 additions and 18 deletions

16
script/dts/index.mjs Normal file
View File

@@ -0,0 +1,16 @@
import * as dts from 'dts-bundle';
import path from 'path';
const currentPath = process.cwd();
const packagePath = path.join(currentPath, 'script/package/package.json');
const mainPath = path.join(currentPath, 'src/type.ts');
const outPath = path.join(currentPath, 'types/index.d.ts');
// node script/dts/index.mjs
dts.bundle({
name: 'my-library',
main: mainPath,
out: outPath,
removeSource: true,
outputAsModuleFolder: true,
});