PlayerEventsEmitter extends EventEmitter<L>
new PlayerEventsEmitter(requiredEvents)
Parameter | Type | Optional | Description |
---|---|---|---|
requiredEvents | Array<keyof L> | ❌ | - |
Properties
public requiredEvents: Array<keyof L>
public static defaultMaxListeners: number
- Source:
packages/utils/dist/index.d.ts#L42
Methods
public addListener(event, listener): PlayerEventsEmitter<L>
Parameter | Type | Optional | Description |
---|---|---|---|
event | U | ❌ | - |
listener | L[U] | ❌ | - |
- Source:
packages/utils/dist/index.d.ts#L44
public emit(name, args): boolean
Parameter | Type | Optional | Description |
---|---|---|---|
name | K | ❌ | - |
args | Parameters<L[K]> | ❌ | - |
public eventNames(): Array<U>
- Source:
packages/utils/dist/index.d.ts#L53
public getMaxListeners(): number
- Source:
packages/utils/dist/index.d.ts#L57
public listenerCount(type): number
Parameter | Type | Optional | Description |
---|---|---|---|
type | keyof L | ❌ | - |
- Source:
packages/utils/dist/index.d.ts#L54
public listeners(type): Array<L[U]>
Parameter | Type | Optional | Description |
---|---|---|---|
type | U | ❌ | - |
- Source:
packages/utils/dist/index.d.ts#L55
public off(event, listener): PlayerEventsEmitter<L>
Parameter | Type | Optional | Description |
---|---|---|---|
event | U | ❌ | - |
listener | L[U] | ❌ | - |
- Source:
packages/utils/dist/index.d.ts#L51
public on(event, listener): PlayerEventsEmitter<L>
Parameter | Type | Optional | Description |
---|---|---|---|
event | U | ❌ | - |
listener | L[U] | ❌ | - |
- Source:
packages/utils/dist/index.d.ts#L50
public once(event, listener): PlayerEventsEmitter<L>
Parameter | Type | Optional | Description |
---|---|---|---|
event | U | ❌ | - |
listener | L[U] | ❌ | - |
- Source:
packages/utils/dist/index.d.ts#L49
public prependListener(event, listener): PlayerEventsEmitter<L>
Parameter | Type | Optional | Description |
---|---|---|---|
event | U | ❌ | - |
listener | L[U] | ❌ | - |
- Source:
packages/utils/dist/index.d.ts#L45
public prependOnceListener(event, listener): PlayerEventsEmitter<L>
Parameter | Type | Optional | Description |
---|---|---|---|
event | U | ❌ | - |
listener | L[U] | ❌ | - |
- Source:
packages/utils/dist/index.d.ts#L46
public rawListeners(type): Array<L[U]>
Parameter | Type | Optional | Description |
---|---|---|---|
type | U | ❌ | - |
- Source:
packages/utils/dist/index.d.ts#L56
public removeAllListeners(event?): PlayerEventsEmitter<L>
Parameter | Type | Optional | Description |
---|---|---|---|
event | keyof L | ✅ | - |
- Source:
packages/utils/dist/index.d.ts#L48
public removeListener(event, listener): PlayerEventsEmitter<L>
Parameter | Type | Optional | Description |
---|---|---|---|
event | U | ❌ | - |
listener | L[U] | ❌ | - |
- Source:
packages/utils/dist/index.d.ts#L47
public setMaxListeners(n): PlayerEventsEmitter<L>
Parameter | Type | Optional | Description |
---|---|---|---|
n | number | ❌ | - |
- Source:
packages/utils/dist/index.d.ts#L58