fix State type (#88)
This commit is contained in:
parent
53f0e4673c
commit
1ae8b52760
|
@ -130,10 +130,15 @@ type RpcAccounts = {
|
|||
[key: string]: PublicKey | RpcAccounts;
|
||||
};
|
||||
|
||||
export type State = {
|
||||
address: () => Promise<PublicKey>;
|
||||
rpc: Rpcs;
|
||||
};
|
||||
export type State = () =>
|
||||
| Promise<any>
|
||||
| {
|
||||
address: () => Promise<PublicKey>;
|
||||
rpc: Rpcs;
|
||||
instruction: Ixs;
|
||||
subscribe: (address: PublicKey, commitment?: Commitment) => EventEmitter;
|
||||
unsubscribe: (address: PublicKey) => void;
|
||||
};
|
||||
|
||||
// Tracks all subscriptions.
|
||||
const subscriptions: Map<string, Subscription> = new Map();
|
||||
|
|
Loading…
Reference in New Issue