From 3b4399751220fb3a61d39032c978e5cc90b6ee81 Mon Sep 17 00:00:00 2001 From: Dominic Lee Date: Sun, 12 Dec 2021 18:34:55 +0000 Subject: [PATCH 1/3] add missing types for conditional exports --- ts/src/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ts/src/index.ts b/ts/src/index.ts index 0e6b5f2253..35fc903fc3 100644 --- a/ts/src/index.ts +++ b/ts/src/index.ts @@ -18,6 +18,9 @@ export { Idl } from "./idl.js"; export * as utils from "./utils/index.js"; export * from "./program/index.js"; +export declare const workspace: any; +export declare const Wallet: import("./nodewallet").default; + if (!isBrowser) { exports.workspace = require("./workspace.js").default; exports.Wallet = require("./nodewallet.js").default; From 910632acb9b4e20f250c55ef5c7e5dcc7a4df731 Mon Sep 17 00:00:00 2001 From: Dominic Lee Date: Sun, 12 Dec 2021 20:37:34 +0000 Subject: [PATCH 2/3] add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0d49a396e..dc3e82d093 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ incremented for features. * ts: Add better error msgs in the ts client if something wrong (i.e. not a pubkey or a string) is passed in as an account in an instruction accounts object ([#1098](https://github.com/project-serum/anchor/pull/1098)). * ts: Add inputs `postInstructions` and `preInstructions` as a replacement for (the now deprecated) `instructions` ([#1007](https://github.com/project-serum/anchor/pull/1007)). * ts: Add `getAccountInfo` helper method to account namespace/client ([#1084](https://github.com/project-serum/anchor/pull/1084)). +* ts: Add type declarations for conditional `workspace` and `Wallet` exports ([#1137](https://github.com/project-serum/anchor/pull/1137)). ### Breaking From 43ff14bd72c7aa166fec38e890e80269778ee274 Mon Sep 17 00:00:00 2001 From: Dominic Lee Date: Mon, 13 Dec 2021 14:49:39 +0000 Subject: [PATCH 3/3] move changelog entry to unreleased section --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc3e82d093..bb5ac3ddee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ incremented for features. ## [Unreleased] +### Fixes + +* ts: Add type declarations for conditional `workspace` and `Wallet` exports ([#1137](https://github.com/project-serum/anchor/pull/1137)). + ## [0.19.0] - 2021-12-08 ### Fixes @@ -28,7 +32,6 @@ incremented for features. * ts: Add better error msgs in the ts client if something wrong (i.e. not a pubkey or a string) is passed in as an account in an instruction accounts object ([#1098](https://github.com/project-serum/anchor/pull/1098)). * ts: Add inputs `postInstructions` and `preInstructions` as a replacement for (the now deprecated) `instructions` ([#1007](https://github.com/project-serum/anchor/pull/1007)). * ts: Add `getAccountInfo` helper method to account namespace/client ([#1084](https://github.com/project-serum/anchor/pull/1084)). -* ts: Add type declarations for conditional `workspace` and `Wallet` exports ([#1137](https://github.com/project-serum/anchor/pull/1137)). ### Breaking