Skip to content

Commit

Permalink
fix: export types in separate directory
Browse files Browse the repository at this point in the history
  • Loading branch information
microwavekonijn committed Jul 23, 2023
1 parent 03b6970 commit 5d6cdbf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"description": "Auto-reconnect and round robin support for amqplib.",
"module": "./dist/esm/index.js",
"main": "./dist/cjs/index.js",
"types": "./dist/esm/index.d.ts",
"types": "./dist/types/index.d.ts",
"exports": {
".": {
"types": "./dist/esm/index.d.ts",
"types": "./dist/types/index.d.ts",
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js",
"default": "./dist/cjs/index.js"
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"lib": ["es2018"],
"allowJs": false,
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
"declaration": true,
"declaration": false,
"sourceMap": true,
"outDir": "./dist/esm",
"stripInternal": true,
Expand Down
8 changes: 8 additions & 0 deletions tsconfig.types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"declaration": true,
"emitDeclarationOnly": true,
"outDir": "./dist/types"
}
}

0 comments on commit 5d6cdbf

Please sign in to comment.