UNPKG

@snail-js/api

Version:

Http Request with Decorators Api, build on axios

11 lines (10 loc) 464 B
import { SnailEventListener } from "../typings"; export declare class SnailEvent<DT = any> { private eventMap; private onceWrapperMap; constructor(); on: <ErrorData = any>(eventName: string, listener: SnailEventListener<DT, ErrorData>) => void; off: (eventName: string, listener: SnailEventListener<DT>) => void; once: (eventName: string, listener: SnailEventListener<DT>) => void; emit: (eventName: string, ...args: any) => boolean; }