import type { Listener } from "@ethersproject/providers" ; import type { Event , EventFilter } from "ethers" ; export interface TypedEvent < TArgsArray extends Array < any > = any , TArgsObject = any > extends Event { args : TArgsArray & TArgsObject ; } export interface TypedEventFilter < _TEvent extends TypedEvent > extends EventFilter { } export interface TypedListener < TEvent extends TypedEvent > { ( ... listenerArg ) : void ; } type __TypechainArgsArray < T > = T extends TypedEvent < infer U > ? U : never ; export interface OnEvent < TRes > { < TEvent extends TypedEvent > ( eventFilter , listener ) : TRes ; ( eventName , listener ) : TRes ; } export type MinEthersFactory < C , ARGS > = { deploy ( ... a ) : Promise < C > ; } ; export type GetContractTypeFromFactory < F > = F extends MinEthersFactory < infer C , any > ? C : never ; export type GetARGsTypeFromFactory < F > = F extends MinEthersFactory < any , any > ? Parameters < F [ "deploy" ] > : never ;