From 6c13b514eebe7c128845302dc27265f2ed15efe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Fri, 22 Dec 2023 14:16:38 -0300 Subject: [PATCH] fix: use ts files for type imports, fixes vscode typing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- package.json | 1 + packages/sdk/package.json | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index eb7a8f81b..77cd47d4f 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "scripts": { "postinstall": "husky install", "clean": "yarn workspaces foreach --all --parallel --verbose run clean", + "clean:all": "yarn clean && rm -rf node_modules packages/*/node_modules", "build": "yarn workspaces foreach --all --verbose run build", "lint": "yarn workspaces foreach --all --parallel --verbose run lint", "test": "yarn workspaces foreach --all --parallel --verbose --interlaced run test" diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 37b2f1bca..ebc14d8ce 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -3,10 +3,16 @@ "version": "0.3.0", "description": "TypeScript based SDK to interact with The Graph protocol contracts", "main": "build/index.js", - "types": "build/index.d.ts", + "types": "src/index.ts", "exports": { - ".": "./build/index.js", - "./gre": "./build/gre/index.js" + ".": { + "default": "./build/index.js", + "types": "./src/index.ts" + }, + "./gre": { + "default": "./build/gre/index.js", + "types": "./src/gre/index.ts" + } }, "repository": "git@github.com:graphprotocol/sdk.git", "author": "tomas@edgeandnode.com",