UNPKG

multyx

Version:

Framework designed to simplify the creation of multiplayer browser games by addressing the complexities of managing server-client communication, shared state, and input handling

26 lines 892 B
import { RawObject } from "../types"; /** * @example * ```js * const a = { a: 3, b: { c: 4 } }; * const b = { d: 1, b: { e: 2 } }; * * const merged = MergeRawObjects({ ...a }, { ...b }); * console.log(merged); // { a: 3, b: { c: 4, e: 2 }, d: 1 } * ``` * @param target any object * @param source any object * @returns merged object */ export declare function MergeRawObjects(target: RawObject, source: RawObject): RawObject; /** * Turn Map<any, any> into RawObject * * coolest mf piece of code ive written it looks so cool wtf * @param target Map to transform into object * @param key Map key to string transform function * @param value Map value to object value transform function * @returns Transformed object */ export declare function MapToObject<K, V>(target: Map<K, V>, key?: (c: K) => string, value?: (v: V) => any): RawObject; //# sourceMappingURL=objects.d.ts.map