From 714f5e6b75afdf8a33a0d9b802bf9224e51a9fc4 Mon Sep 17 00:00:00 2001 From: Matthew Callens Date: Mon, 31 Jan 2022 18:31:21 -0500 Subject: [PATCH] ts: fix `Wallet` class declaration (#1363) --- CHANGELOG.md | 4 ++++ ts/src/index.ts | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f923289684..778d68002c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ incremented for features. ## [Unreleased] +### Fixes + +* ts: Fix the root type declaration of the `Wallet` / `NodeWallet` class. ([#1363](https://github.com/project-serum/anchor/pull/1363)) + ### Features * lang: Add `seeds::program` constraint for specifying which program_id to use when deriving PDAs.([#1197](https://github.com/project-serum/anchor/pull/1197)) diff --git a/ts/src/index.ts b/ts/src/index.ts index f359ef86f6..818ad60d64 100644 --- a/ts/src/index.ts +++ b/ts/src/index.ts @@ -1,3 +1,4 @@ +import NodeWallet from "./nodewallet"; import { isBrowser } from "./utils/common.js"; export { default as BN } from "bn.js"; @@ -12,7 +13,7 @@ export * from "./program/index.js"; export * from "./spl/index.js"; export declare const workspace: any; -export declare const Wallet: import("./nodewallet").default; +export declare class Wallet extends NodeWallet {} if (!isBrowser) { exports.workspace = require("./workspace.js").default;