UNPKG

fnbr

Version:

A library to interact with Epic Games' Fortnite HTTP and XMPP services

42 lines (41 loc) 1.18 kB
import type { Schema } from '../../resources/structs'; /** * Represents a key-value-based meta structure used for parties and party members * @private */ declare class Meta<T extends Schema> { /** * The key-value schema */ schema: T; /** * @param schema The key-value schema */ constructor(schema: T); /** * Adds a key-value pair to the schema * @param key The key * @param value The value * @param isRaw Whether the value should be added without further type checking * @returns A parsed version of the value */ set(key: keyof T & string, value: any, isRaw?: boolean): T[keyof T & string]; /** * Gets a value inside the schema by its key * @param key The key * @returns The value of the provided key */ get(key: keyof T & string): any; /** * Updates the schema * @param schema The new schema * @param isRaw Whether the values are raw */ update(schema: Partial<T>, isRaw?: boolean): void; /** * Deletes the provided keys * @param keys The keys to delete */ remove(keys: (keyof T & string)[]): void; } export default Meta;