UNPKG

detritus-client

Version:

A Typescript NodeJS library to interact with Discord's API, both Rest and Gateway.

48 lines (47 loc) 1.61 kB
/// <reference types="node" /> import { inspect } from 'util'; import { ShardClient } from '../client'; import { BaseSet } from '../collections'; export declare function convertKey(snake: string): string; export interface BaseStructureData { [key: string]: any; } /** * The most basic Structure class, every structure extends this * @category Structure */ export declare class Structure { /** @ignore */ readonly _keys?: BaseSet<string>; /** @ignore */ readonly _keysMerge?: BaseSet<string>; /** @ignore */ readonly _keysSkipDifference?: BaseSet<string>; _getFromSnake(key: string): any; _setFromSnake(key: string, value: any): any; difference(key: string, value: any): [boolean, any]; differences(data?: BaseStructureData): null | object; differencesBetween(structure: Structure): null | object; hasDifference(key: string, value: any): boolean; hasDifferences(data?: BaseStructureData): boolean; hasDifferencesBetween(structure: Structure): boolean; merge(data?: BaseStructureData): void; mergeValue(key: string, value: any): void; toJSON(): object; [inspect.custom](): object; } /** * Basic Structure class with an added ShardClient attached to it * @category Structure */ export declare class BaseStructure extends Structure { /** @ignore */ readonly _clone?: boolean; /** @ignore */ readonly _uncloneable?: boolean; readonly client: ShardClient; constructor(client: ShardClient, data?: BaseStructureData, isClone?: boolean); get isClone(): boolean; get shardId(): number; clone(): this; }