File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 1- import { waitFor } from '@dedot/utils/dist/index.js ' ;
1+ import { waitFor } from '@dedot/utils' ;
22import { DedotClient , WsProvider } from 'dedot' ;
33
44const provider = new WsProvider ( {
Original file line number Diff line number Diff line change @@ -87,8 +87,7 @@ export type ClientOptions = ApiOptions & {
8787 */
8888export class DedotClient <
8989 ChainApi extends GenericSubstrateApi = SubstrateApi , // --
90- > implements ISubstrateClient < ChainApi , ApiEvent >
91- {
90+ > implements ISubstrateClient < ChainApi , ApiEvent > {
9291 #client: ISubstrateClient < ChainApi , ApiEvent > ;
9392 /** The JSON-RPC version being used ('v2' or 'legacy') */
9493 rpcVersion : RpcVersion ;
@@ -398,7 +397,7 @@ export class DedotClient<
398397 * @param handler - The handler function to remove (optional, removes all handlers if not provided)
399398 * @returns This client instance for method chaining
400399 */
401- off ( event : ApiEvent , handler ?: ( ( ... args : any [ ] ) => void ) | undefined ) : this {
400+ off < Event extends ApiEvent = ApiEvent > ( event : Event , handler ?: EventHandlerFn < Event > ) : this {
402401 this . #client. off ( event , handler ) ;
403402 return this ;
404403 }
You can’t perform that action at this time.
0 commit comments