Browse Source

ts: fix `Wallet` class declaration (#1363)

Matthew Callens 3 years ago
parent
commit
714f5e6b75
2 changed files with 6 additions and 1 deletions
  1. 4 0
      CHANGELOG.md
  2. 2 1
      ts/src/index.ts

+ 4 - 0
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))

+ 2 - 1
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;