diff --git a/package.json b/package.json index 299aa4f043..3446ecb1f8 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ }, "exports": { ".": { + "types": "./ably.d.ts", "node": "./build/ably-node.js", "react-native": "./build/ably-reactnative.js", "default": "./build/ably.js" diff --git a/test/package/browser/template/package.json b/test/package/browser/template/package.json index 1c91a386eb..8ee502bb86 100644 --- a/test/package/browser/template/package.json +++ b/test/package/browser/template/package.json @@ -5,7 +5,7 @@ "main": "index.js", "scripts": { "build": "esbuild --bundle src/index-default.ts --outdir=dist && esbuild --bundle src/index-modules.ts --outdir=dist", - "typecheck": "tsc -noEmit", + "typecheck": "tsc --project src -noEmit", "test-support:server": "ts-node server/server.ts", "test": "playwright test", "test:install-deps": "playwright install chromium" diff --git a/test/package/browser/template/src/tsconfig.json b/test/package/browser/template/src/tsconfig.json new file mode 100644 index 0000000000..cca98c96fa --- /dev/null +++ b/test/package/browser/template/src/tsconfig.json @@ -0,0 +1,9 @@ +{ + "include": ["**/*.ts"], + "compilerOptions": { + "resolveJsonModule": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler" + } +} diff --git a/test/package/browser/template/tsconfig.json b/test/package/browser/template/tsconfig.json index 4928ea369e..2f98042715 100644 --- a/test/package/browser/template/tsconfig.json +++ b/test/package/browser/template/tsconfig.json @@ -1,7 +1,5 @@ { - "include": ["src/**/*.ts"], "compilerOptions": { - "resolveJsonModule": true, "esModuleInterop": true } }