diff --git a/packages/core/index.d.ts b/packages/core/index.d.ts index a640d791..34cd55d8 100644 --- a/packages/core/index.d.ts +++ b/packages/core/index.d.ts @@ -10,7 +10,6 @@ declare function genJson(depth: number, relations: Relations, shouldOptimize?: b declare function genTxt(depth: number, relations: Relations): string -declare function genRelations(): Relations declare function genTree(maxDep: number, relations: Relations): Tree diff --git a/packages/core/node.d.ts b/packages/core/node.d.ts new file mode 100644 index 00000000..fd59014d --- /dev/null +++ b/packages/core/node.d.ts @@ -0,0 +1,3 @@ +import { Relations} from '@truth-cli/shared' + +declare function genRelations(): Relations diff --git a/packages/core/package.json b/packages/core/package.json index ca72a4dd..b7ee0425 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -3,17 +3,23 @@ "version": "1.1.0", "type": "module", "main": "dist/index.js", - "types": "index.d.ts", "files": [ "dist", - "index.d.ts" + "index.d.ts", + "node.d.ts" ], "devDependencies": { "@truth-cli/shared": "workspace:^" }, "exports": { - ".": "./dist/index.js", - "./node": "./dist/node.js" + ".": { + "types": "./index.d.ts", + "import": "./dist/index.js" + }, + "./node": { + "types": "./node.d.ts", + "import": "./dist/node.js" + } }, "lint-staged": { "!(*d).{js,ts}": [