Skyline/node_modules/@discordjs/collection/dist/index.mjs.map

8 lines
32 KiB
Text
Raw Normal View History

2021-11-22 17:39:03 +00:00
{
"version": 3,
"sources": ["../src/index.ts"],
2021-11-22 20:07:00 +00:00
"sourcesContent": ["export interface CollectionConstructor {\n\tnew (): Collection<unknown, unknown>;\n\tnew <K, V>(entries?: ReadonlyArray<readonly [K, V]> | null): Collection<K, V>;\n\tnew <K, V>(iterable: Iterable<readonly [K, V]>): Collection<K, V>;\n\treadonly prototype: Collection<unknown, unknown>;\n\treadonly [Symbol.species]: CollectionConstructor;\n}\n\n/**\n * A Map with additional utility methods. This is used throughout discord.js rather than Arrays for anything that has\n * an ID, for significantly improved performance and ease-of-use.\n * @extends {Map}\n * @property {number} size - The amount of elements in this collection.\n */\nexport class Collection<K, V> extends Map<K, V> {\n\tpublic static readonly default: typeof Collection = Collection;\n\tpublic override ['constructor']: CollectionConstructor;\n\n\t/**\n\t * Identical to [Map.get()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get).\n\t * Gets an element with the specified key, and returns its value, or `undefined` if the element does not exist.\n\t * @param {*} key - The key to get from this collection\n\t * @returns {* | undefined}\n\t */\n\tpublic override get(key: K): V | undefined {\n\t\treturn super.get(key);\n\t}\n\n\t/**\n\t * Identical to [Map.set()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/set).\n\t * Sets a new element in the collection with the specified key and value.\n\t * @param {*} key - The key of the element to add\n\t * @param {*} value - The value of the element to add\n\t * @returns {Collection}\n\t */\n\tpublic override set(key: K, value: V): this {\n\t\treturn super.set(key, value);\n\t}\n\n\t/**\n\t * Identical to [Map.has()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/has).\n\t * Checks if an element exists in the collection.\n\t * @param {*} key - The key of the element to check for\n\t * @returns {boolean} `true` if the element exists, `false` if it does not exist.\n\t */\n\tpublic override has(key: K): boolean {\n\t\treturn super.has(key);\n\t}\n\n\t/**\n\t * Identical to [Map.delete()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/delete).\n\t * Deletes an element from the collection.\n\t * @param {*} key - The key to delete from the collection\n\t * @returns {boolean} `true` if the element was removed, `false` if the element does not exist.\n\t */\n\tpublic override delete(key: K): boolean {\n\t\treturn super.delete(key);\n\t}\n\n\t/**\n\t * Identical to [Map.clear()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/clear).\n\t * Removes all elements from the collection.\n\t * @returns {undefined}\n\t */\n\tpublic override clear(): void {\n\t\treturn super.clear();\n\t}\n\n\t/**\n\t * Checks if all of the elements exist in the collection.\n\t * @param {...*} keys - The keys of the elements to check for\n\t * @returns {boolean} `true` if all of the elements exist, `false` if at least one does not exist.\n\t */\n\tpublic hasAll(...keys: K[]): boolean {\n\t\treturn keys.every((k) => super.has(k));\n\t}\n\n\t/**\n\t * Checks if any of the elements exist in the collection.\n\t * @param {...*} keys - The keys of the elements to check for\n\t * @returns {boolean} `true` if any of the elements exist, `false` if none exist.\n\t */\n\tpublic hasAny(...keys: K[]): boolean {\n\t\treturn keys.some((k) => super.has(k));\n\t}\n\n\t/**\n\t * Obtains the first value(s) in this collection.\n\t * @param {number} [amount] Amount of values to obtain from the beginning\n\t * @returns {*|Array<*>} A single value if no amount is provided or an array of values, starting from the end if\n\t * amount is negative\n\t */\n\tpublic first(): V | undefined;\n\tpublic first(amount: number): V[];\n\tpublic first(amount?: number): V | V[] | undefined {\n\t\tif (typeof amount === 'undefined') return this.values().next().value;\n\t\tif (amount < 0) return this.last(amount * -1);\n\t\tamount = Math.min(this.size, amount);\n\t\tconst iter = this.values();\
"mappings": "+EAcO,mBAA+B,IAAU,CAU/B,IAAI,EAAuB,CAC1C,MAAO,OAAM,IAAI,GAUF,IAAI,EAAQ,EAAgB,CAC3C,MAAO,OAAM,IAAI,EAAK,GASP,IAAI,EAAiB,CACpC,MAAO,OAAM,IAAI,GASF,OAAO,EAAiB,CACv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