Skip to content

EmitArgs

EmitArgs<TPayload> = undefined extends TPayload ? [data?: TPayload] : [data: TPayload]

Defined in: types.ts:365

The payload argument list for one emit() call. The payload is optional when the declared type admits undefined (ping: undefined, or a union with it) and required otherwise. On the wide map every payload is unknown, which admits undefined, so emit(name) stays legal there.

TPayload