Skip to main content
reference

LibBreakEvent

Event that can be emmited to break the waitEvent loop.

Static Methods

typeStr()

Returns the event type as a string. This method returns the constant string `"libBreak"`, identifying the type of this event as `libBreak`.

public static func typeStr() -> String

TypeDescription
String A `String` representing the event type, in this case, `"libBreak"`.

Methods

getChannel()

Returns the event channel as a string. This implementation returns the constant string `"platform"`, identifying the channel associated with `LibBreakEvent`.

public func getChannel() -> String

TypeDescription
String A `String` representing the event channel, in this case, `"platform"`.

handleWith(cb:)

Handles the event by calling the provided callback with an optional argument. This implementation always passes `nil` to the callback.

public func handleWith(
cb: @escaping ((Any?) -> Void)
)

NameTypeDescription
cb@escaping ((Any?) -> Void)A closure that accepts an optional `Any?` argument, representing the data to be passed when the event is handled.