import { ColRoom, Colyseus, Events, Visitor } from './types'; /** * make every change in Colyseus room state trigger an event in the EventEmitter using the provided namespace. * @param state Root Colyseus state object (Schema instance) * @param callbackProxy Callback proxy obtained from getStateCallbacks(room) in colyseus.js * @param events EventsEmitter of you choice. has to at least have the method `emit(eventName, value)`. * @param namespace (optional) Prefix of json pointer * @returns the provided events emitter (3rd argument) */ export type WireEvents = ReturnType; /** * create a version of `wireEvents` with custom visitors * @param visitors a collection of visitors, ordered by specificity. the first visitor to return `true` for an object will prevent the next visitors from visiting it. * @returns a customized `wireEvents` function */ export declare function customWireEvents(visitors: Iterable): (room: ColRoom, userEvents: T, rootNamespace?: string) => { events: T; }; /** * make every change in Colyseus room state trigger an event in the EventEmitter using the provided namespace. * Only handle vanilla Colyseus types : Schema, ArraySchema, MapSchema. To add special behavior for custom types, use `customWireEvents()` * @param state Root Colyseus state object (Schema instance) * @param callbackProxy Callback proxy obtained from getStateCallbacks(room) in colyseus.js * @param events EventsEmitter of you choice. has to at least have the method `emit(eventName, value)`. * @param namespace (optional) Prefix of json pointer * @returns the provided events emitter (3rd argument) */ export declare const wireEvents: (room: ColRoom, userEvents: T, rootNamespace?: string) => { events: T; }; //# sourceMappingURL=wire-events.d.ts.map