mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-26 14:05:04 +08:00
# Conflicts: # jsowell-ui/.env.development # jsowell-ui/.env.staging # jsowell-ui/bin/build-sit.bat # jsowell-ui/bin/build.bat # jsowell-ui/src/api/adapayMember/adapayMember.js # jsowell-ui/src/api/pile/merchant.js # jsowell-ui/src/router/index.js # jsowell-ui/src/views/financial/financeDetail.vue # jsowell-ui/src/views/financial/merchant.vue # jsowell-ui/src/views/homeIndex/homeIndex.vue # jsowell-ui/src/views/login.vue # jsowell-ui/src/views/pile/basic/detail.vue # jsowell-ui/src/views/pile/station/components/SiteInfo.vue # jsowell-ui/src/views/pile/station/detail.vue # jsowell-ui/src/views/pile/station/orderReport.vue
51 lines
1.4 KiB
TypeScript
51 lines
1.4 KiB
TypeScript
export as namespace EventEmitter;
|
|
|
|
type ListenerFn = (...args: Array<any>) => void;
|
|
|
|
/**
|
|
* Minimal `EventEmitter` interface that is molded against the Node.js
|
|
* `EventEmitter` interface.
|
|
*/
|
|
export class EventEmitter {
|
|
static prefixed: string | boolean;
|
|
|
|
/**
|
|
* Return an array listing the events for which the emitter has registered
|
|
* listeners.
|
|
*/
|
|
eventNames(): Array<string | symbol>;
|
|
|
|
/**
|
|
* Return the listeners registered for a given event.
|
|
*/
|
|
listeners(event: string | symbol, exists: boolean): Array<ListenerFn> | boolean;
|
|
listeners(event: string | symbol): Array<ListenerFn>;
|
|
|
|
/**
|
|
* Calls each of the listeners registered for a given event.
|
|
*/
|
|
emit(event: string | symbol, ...args: Array<any>): boolean;
|
|
|
|
/**
|
|
* Add a listener for a given event.
|
|
*/
|
|
on(event: string | symbol, fn: ListenerFn, context?: any): this;
|
|
addListener(event: string | symbol, fn: ListenerFn, context?: any): this;
|
|
|
|
/**
|
|
* Add a one-time listener for a given event.
|
|
*/
|
|
once(event: string | symbol, fn: ListenerFn, context?: any): this;
|
|
|
|
/**
|
|
* Remove the listeners of a given event.
|
|
*/
|
|
removeListener(event: string | symbol, fn?: ListenerFn, context?: any, once?: boolean): this;
|
|
off(event: string | symbol, fn?: ListenerFn, context?: any, once?: boolean): this;
|
|
|
|
/**
|
|
* Remove all listeners, or those of the specified event.
|
|
*/
|
|
removeAllListeners(event?: string | symbol): this;
|
|
}
|