Files
lan-manager/web/node_modules/@antv/event-emitter/lib/index.d.ts
openclaw 0a5f6a8047 Initial commit: Lan-manager project code
- Go backend (server/)
- Frontend (web/, server/static/)
- Database and deployment files
- Scripts and docs

Co-Authored-By: 狸花猫/Claude-Qwen3.6-Plus 🐾
2026-04-20 00:52:58 +08:00

35 lines
789 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
interface EventType {
readonly callback: Function;
readonly once: boolean;
}
export default class EventEmitter {
private _events;
/**
* 监听一个事件
* @param evt
* @param callback
* @param once
*/
on(evt: string, callback: Function, once?: boolean): this;
/**
* 监听一个事件一次
* @param evt
* @param callback
*/
once(evt: string, callback: Function): this;
/**
* 触发一个事件
* @param evt
* @param args
*/
emit(evt: string, ...args: any[]): void;
/**
* 取消监听一个事件或者一个channel
* @param evt
* @param callback
*/
off(evt?: string, callback?: Function): this;
getEvents(): Record<string, EventType[]>;
}
export {};