diff --git a/index.d.mts b/index.d.mts new file mode 100644 index 0000000..fcb9204 --- /dev/null +++ b/index.d.mts @@ -0,0 +1 @@ +export * from './index.js' diff --git a/package.json b/package.json index 04dbde6..24a357a 100644 --- a/package.json +++ b/package.json @@ -19,17 +19,23 @@ "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "browser": "./dist/umd/i18nextV4FormatConverter.js", - "types": "./index.d.ts", + "types": "./index.d.mts", "exports": { "./package.json": "./package.json", ".": { + "types": { + "require": "./index.d.ts", + "import": "./index.d.mts" + }, "require": "./dist/cjs/index.js", "default": "./dist/esm/index.js" }, "./cjs": { + "types": "./index.d.ts", "default": "./dist/cjs/index.js" }, "./esm": { + "types": "./index.d.mts", "default": "./dist/esm/index.js" }, "./src": { @@ -41,7 +47,7 @@ }, "scripts": { "lint:javascript": "eslint .", - "lint:typescript": "eslint -c .ts.eslintrc *.d.ts test/types/**/*.test-d.ts", + "lint:typescript": "eslint -c .ts.eslintrc *.d.ts *.d.mts test/types/**/*.test-d.ts", "lint": "npm run lint:javascript && npm run lint:typescript", "build": "rm -rf dist && rollup -c && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json", "test:deno": "deno test test/deno/*.ts --reload --no-check", diff --git a/tsconfig.json b/tsconfig.json index 0b29b93..8c19033 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,6 +8,7 @@ }, "include": [ "/test/types/*.test-d.ts", - "/*.d.ts" + "/*.d.ts", + "/*.d.mts" ] }