Skip to content
On this page

on()

Subscribes to a custom server event with the specified listener.

Function Definition

ts
function on<K extends string>(eventName: K, listener: shared.InterfaceValueByKey<IServerEvent, K, (...args: any[]) => void, never>): void;

Arguments

  • eventName: K
  • listener: shared.InterfaceValueByKey<IServerEvent, K, (...args: any[]) => void, never>

Returns

  • void

Documentation

No Documentation Provided Yet

Documentation Created with ❤️ by Stuyk