pw-js-api
Version:
A PixelWalker Library, aims to be minimal with support for browsers.
16 lines (15 loc) • 915 B
TypeScript
import type { ColItem, ColQuery } from "../types/api.js";
import type { CustomBotEvents, MergedEvents } from "../types/events.js";
export declare function queryToString<T extends ColItem>(query: ColQuery<T> | undefined): string;
/**
* This takes in two parameters - Object A and B.
*
* Object A will be used as the object to add properties from Object B to.
* If some of the properties in Object B are also objects, this will run recursively to ensure they are all added.
*
* Annoyingly, due to how Typescript works, the only way I could get an object with combined properties is if I return it so rip mutability.
*
* IGNORE THE LAST TWO PARAMETERS.
*/
export declare function mergeObjects<A extends Record<string, any>, B extends Record<string, any>>(objA: A, objB: B, depth?: number, prevObj?: any): A & B;
export declare function isCustomPacket(type: keyof MergedEvents): type is keyof CustomBotEvents;