@file:Suppress( "INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS", "EXTERNAL_DELEGATION" ) @file:JsModule("eventemitter2") @file: JsNonModule package hep.dataforge.vis.spatial.editor import kotlin.js.Promise //typealias eventNS = Array external interface ConstructorOptions { var wildcard: Boolean? get() = definedExternally; set(value) = definedExternally var delimiter: String? get() = definedExternally; set(value) = definedExternally var newListener: Boolean? get() = definedExternally; set(value) = definedExternally var maxListeners: Number? get() = definedExternally; set(value) = definedExternally var verboseMemoryLeak: Boolean? get() = definedExternally; set(value) = definedExternally } external interface EventAndListener { @nativeInvoke operator fun invoke(event: String, vararg values: Any) @nativeInvoke operator fun invoke(event: Array, vararg values: Any) } external open class EventEmitter2(options: ConstructorOptions? = definedExternally /* null */) { open fun emit(event: String, vararg values: Any): Boolean open fun emit(event: Array, vararg values: Any): Boolean open fun emitAsync(event: String, vararg values: Any): Promise> open fun emitAsync(event: Array, vararg values: Any): Promise> open fun addListener(event: String, listener: Function<*>): EventEmitter2 /* this */ open fun on(event: String, listener: Function<*>): EventEmitter2 /* this */ open fun on(event: Array, listener: Function<*>): EventEmitter2 /* this */ open fun prependListener(event: String, listener: Function<*>): EventEmitter2 /* this */ open fun prependListener(event: Array, listener: Function<*>): EventEmitter2 /* this */ open fun once(event: String, listener: Function<*>): EventEmitter2 /* this */ open fun once(event: Array, listener: Function<*>): EventEmitter2 /* this */ open fun prependOnceListener(event: String, listener: Function<*>): EventEmitter2 /* this */ open fun prependOnceListener(event: Array, listener: Function<*>): EventEmitter2 /* this */ open fun many(event: String, timesToListen: Number, listener: Function<*>): EventEmitter2 /* this */ open fun many(event: Array, timesToListen: Number, listener: Function<*>): EventEmitter2 /* this */ open fun prependMany(event: String, timesToListen: Number, listener: Function<*>): EventEmitter2 /* this */ open fun prependMany(event: Array, timesToListen: Number, listener: Function<*>): EventEmitter2 /* this */ open fun onAny(listener: EventAndListener): EventEmitter2 /* this */ open fun prependAny(listener: EventAndListener): EventEmitter2 /* this */ open fun offAny(listener: Function<*>): EventEmitter2 /* this */ open fun removeListener(event: String, listener: Function<*>): EventEmitter2 /* this */ open fun removeListener(event: Array, listener: Function<*>): EventEmitter2 /* this */ open fun off(event: String, listener: Function<*>): EventEmitter2 /* this */ open fun removeAllListeners(event: String? = definedExternally /* null */): EventEmitter2 /* this */ open fun removeAllListeners(event: Array? = definedExternally /* null */): EventEmitter2 /* this */ open fun setMaxListeners(n: Number) open fun eventNames(): Array open fun listeners(event: String): Array> open fun listeners(event: Array): Array> open fun listenersAny(): Array> open fun removeAllListeners(): EventEmitter2 /* this */ }