Events
addListener
-
Parameters
-
event: "connecting" | "connected" | "disconnecting"
-
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
Methods
emit
- emit(event: string | symbol, ...args: any[]): boolean
- emit(event: "connecting" | "connected" | "disconnecting", previousState: ElkConnectionState): void
- emit(event: "disconnected", previousState: ElkConnectionState, error?: Error): void
- emit(event: "error", error: Error): void
- emit(event: "data", data: string): void
-
Parameters
-
event: string | symbol
-
Rest ...args: any[]
Returns boolean
-
Parameters
-
event: "connecting" | "connected" | "disconnecting"
-
Returns void
-
Parameters
-
event: "disconnected"
-
-
Optional error: Error
Returns void
-
Parameters
-
event: "error"
-
error: Error
Returns void
-
Parameters
-
event: "data"
-
data: string
Returns void
on
-
Parameters
-
event: "connecting" | "connected" | "disconnecting"
-
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
once
-
Parameters
-
event: "connecting" | "connected" | "disconnecting"
-
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
prependListener
-
Parameters
-
event: "connecting" | "connected" | "disconnecting"
-
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
prependOnceListener
- prependOnceListener(event: "connecting" | "connected" | "disconnecting", listener: StateChangeListener): this
- prependOnceListener(event: "disconnected", listener: DisconnectedListener): this
- prependOnceListener(event: "error", listener: ErrorListener): this
- prependOnceListener(event: "data", listener: DataListener): this
-
Parameters
-
event: "connecting" | "connected" | "disconnecting"
-
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
removeListener
-
Parameters
-
event: "connecting" | "connected" | "disconnecting"
-
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
write
- write(data: string): Promise<unknown>
-
Parameters
Returns Promise<unknown>
Emitted whenever the connection state has changed.