import { TransactionReceipt } from "./types"; type PromiEventType = "transactionHash" | "receipt" | "confirmation" | "error"; export default interface PromiEvent extends Promise { once( type: "transactionHash", handler: (receipt: string) => void ): PromiEvent; once( type: "receipt", handler: (receipt: TransactionReceipt) => void ): PromiEvent; once( type: "confirmation", handler: (confNumber: number, receipt: TransactionReceipt) => void ): PromiEvent; once(type: "error", handler: (error: Error) => void): PromiEvent; once( type: PromiEventType, handler: (error: Error | TransactionReceipt | string) => void ): PromiEvent; on( type: "transactionHash", handler: (receipt: string) => void ): PromiEvent; on( type: "receipt", handler: (receipt: TransactionReceipt) => void ): PromiEvent; on( type: "confirmation", handler: (confNumber: number, receipt: TransactionReceipt) => void ): PromiEvent; on(type: "error", handler: (error: Error) => void): PromiEvent; on( type: "error" | "confirmation" | "receipt" | "transactionHash", handler: (error: Error | TransactionReceipt | string) => void ): PromiEvent; }