From 485304ee318d37f0f01604a28797f662606f7fe3 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sat, 4 Feb 2023 21:51:48 +0100 Subject: [PATCH] fix: Build types in `dist/` and add the types entrypoint in `package.json` Signed-off-by: Ferdinand Thiessen --- package.json | 1 + tsconfig.json | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 55c90378..6238b4a5 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "2.5.0", "description": "", "main": "dist/index.js", + "types": "dist/index.d.ts", "scripts": { "build": "tsc -d && babel ./lib --out-dir dist --extensions '.ts,.tsx' --source-maps", "build:doc": "typedoc", diff --git a/tsconfig.json b/tsconfig.json index 5bf7daa6..08846f8e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,13 +1,15 @@ { "compilerOptions": { - "target": "es5", + "target": "ESNext", "module": "commonjs", "declaration": true, "outDir": "./dist", + "declarationDir": "./dist", "strict": true, "lib": [ "es6", "dom" ] - } + }, + "include": [ "lib/*" ] }