UNPKG

guilded.ts

Version:

A powerful NPM module that allows you to easily interact with the Guilded API.

29 lines 970 B
import { Collection } from '@discordjs/collection'; /** * A custom cache collection which has a max cache size. * @example new CacheCollection(); */ export declare class CacheCollection<K, V> extends Collection<K, V> { maxSize?: number | undefined; /** * @param maxSize The max size of the cache. * @param entries The initial entries of the cache. */ constructor(maxSize?: number | undefined, entries?: Iterable<[K, V]> | null); /** * Set the max size of the cache. * @param maxSize The max size of the cache. * @returns The cache collection. * @example cache.setMaxSize(100); */ setMaxSize(maxSize?: number): this; /** * Set an entry in the cache. * @param key The key of the entry. * @param value The value of the entry. * @returns The cache collection. * @example cache.set(key, value); */ set(key: K, value: V): this; } //# sourceMappingURL=CacheCollection.d.ts.map