From 13cc0b939af5a1f9ff860dcebf8f075ce0294bdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Harrtell?= Date: Sat, 16 Nov 2024 11:38:09 +0100 Subject: [PATCH] Generate typescript types to package dist --- package.json | 4 +++- tsconfig.json | 12 ++++++++++++ yarn.lock | 5 +++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 tsconfig.json diff --git a/package.json b/package.json index 6e8030d7..f6099557 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,8 @@ "mocha": "10.8.2", "mocha-lcov-reporter": "1.3.0", "nyc": "17.1.0", - "rollup": "4.27.2" + "rollup": "4.27.2", + "typescript": "^5.6.3" }, "dependencies": { "fastpriorityqueue": "^0.7.5" @@ -57,6 +58,7 @@ "test-perf": "0x -- node $(which _mocha) --timeout 10s --recursive test/auto/node test/manual", "coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov", "build-jsdoc": "jsdoc -c doc/jsdoc.json", + "gen-types": "tsc", "build": "rollup -c rollup.config.js -o dist/jsts.min.js" } } diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..3131200c --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "declaration": true, + "emitDeclarationOnly": true, + "allowJs": true, + "checkJs": true, + "skipLibCheck": true, + "noEmitOnError": false, + "outDir": "dist/types" + }, + "include": ["src/**/*"] + } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index fe189403..9ab0b03a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2335,6 +2335,11 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" +typescript@^5.6.3: + version "5.6.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.3.tgz#5f3449e31c9d94febb17de03cc081dd56d81db5b" + integrity sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw== + uc.micro@^2.0.0, uc.micro@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-2.1.0.tgz#f8d3f7d0ec4c3dea35a7e3c8efa4cb8b45c9e7ee"