Class: Store<T>
Type parameters
Name | Type |
---|---|
T | extends Piece |
Hierarchy
Collection
<string
,T
>↳
Store
↳↳
AliasStore
Constructors
constructor
• new Store<T
>(constructor
, options
)
Type parameters
Name | Type |
---|---|
T | extends Piece <PieceOptions , T > |
Parameters
Name | Type | Description |
---|---|---|
constructor | AbstractConstructor <T > | |
options | StoreOptions <T > |
Overrides
Collection<string, T\>.constructor
Defined in
projects/pieces/src/lib/structures/Store.ts:63
Properties
Constructor
• Readonly
Constructor: AbstractConstructor
<T
>
Defined in
projects/pieces/src/lib/structures/Store.ts:54
[toStringTag]
• Readonly
[toStringTag]: string
Inherited from
Collection.__@toStringTag@16172
Defined in
node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:135
constructor
• constructor: CollectionConstructor
Inherited from
Collection.constructor
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:21
name
• Readonly
name: string
Defined in
projects/pieces/src/lib/structures/Store.ts:55
paths
• Readonly
paths: Set
<string
>
Defined in
projects/pieces/src/lib/structures/Store.ts:56
size
• Readonly
size: number
Inherited from
Collection.size
Defined in
node_modules/typescript/lib/lib.es2015.collection.d.ts:28
strategy
• Readonly
strategy: ILoaderStrategy
<T
>
Defined in
projects/pieces/src/lib/structures/Store.ts:57
[species]
▪ Static
Readonly
[species]: MapConstructor
Inherited from
Collection.__@species@16751
Defined in
node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:317
defaultStrategy
▪ Static
defaultStrategy: ILoaderStrategy
<any
>
Defined in
projects/pieces/src/lib/structures/Store.ts:304
logger
▪ Static
logger: null
| StoreLogger
= null
Defined in
projects/pieces/src/lib/structures/Store.ts:309
Accessors
container
• get
container(): Container
Returns
Defined in
projects/pieces/src/lib/structures/Store.ts:75
Methods
[iterator]
▸ [iterator](): IterableIterator
<[string
, T
]>
Returns
IterableIterator
<[string
, T
]>
Inherited from
Collection.__@iterator@16234
Defined in
node_modules/typescript/lib/lib.es2015.iterable.d.ts:121
at
▸ at(index
): undefined
| T
Parameters
Name | Type | Description |
---|---|---|
index | number |
Returns
undefined
| T
Inherited from
Collection.at
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:100
clear
▸ clear(): void
Returns
void
Inherited from
Collection.clear
Defined in
node_modules/typescript/lib/lib.es2015.collection.d.ts:22
clone
▸ clone(): Collection
<string
, T
>
Returns
Collection
<string
, T
>
Inherited from
Collection.clone
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:319
concat
▸ concat(...collections
): Collection
<string
, T
>
Parameters
Name | Type | Description |
---|---|---|
...collections | ReadonlyCollection <string , T >[] |
Returns
Collection
<string
, T
>
Inherited from
Collection.concat
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:328
construct
▸ construct(Ctor
, data
): T
Parameters
Name | Type | Description |
---|---|---|
Ctor | ILoaderResultEntry <T > | |
data | HydratedModuleData |
Returns
T
Defined in
projects/pieces/src/lib/structures/Store.ts:241
delete
▸ delete(key
): boolean
Parameters
Name | Type |
---|---|
key | string |
Returns
boolean
Inherited from
Collection.delete
Defined in
node_modules/typescript/lib/lib.es2015.collection.d.ts:23
difference
▸ difference<T
>(other
): Collection
<string
, T
| T
>
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
other | ReadonlyCollection <string , T > |
Returns
Collection
<string
, T
| T
>
Inherited from
Collection.difference
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:362
each
▸ each(fn
): Store
<T
>
Parameters
Name | Type | Description |
---|---|---|
fn | (value : T , key : string , collection : Store <T >) => void |
Returns
Store
<T
>
Inherited from
Collection.each
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:297
▸ each<T
>(fn
, thisArg
): Store
<T
>
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
fn | (this : T , value : T , key : string , collection : Store <T >) => void |
thisArg | T |
Returns
Store
<T
>
Inherited from
Collection.each
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:298
ensure
▸ ensure(key
, defaultValueGenerator
): T
Parameters
Name | Type | Description |
---|---|---|
key | string | |
defaultValueGenerator | (key : string , collection : Store <T >) => T |
Returns
T
Inherited from
Collection.ensure
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:37
entries
▸ entries(): IterableIterator
<[string
, T
]>
Returns
IterableIterator
<[string
, T
]>
Inherited from
Collection.entries
Defined in
node_modules/typescript/lib/lib.es2015.iterable.d.ts:126
equals
▸ equals(collection
): boolean
Parameters
Name | Type | Description |
---|---|---|
collection | ReadonlyCollection <string , T > |
Returns
boolean
Inherited from
Collection.equals
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:338
every
▸ every<K2
>(fn
): this is Collection<K2, T>
Type parameters
Name | Type |
---|---|
K2 | extends string |
Parameters
Name | Type | Description |
---|---|---|
fn | (value : T , key : string , collection : Store <T >) => key is K2 |
Returns
this is Collection<K2, T>
Inherited from
Collection.every
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:265
▸ every<V2
>(fn
): this is Collection<string, V2>
Type parameters
Name | Type |
---|---|
V2 | extends Piece <PieceOptions , V2 > |
Parameters
Name | Type |
---|---|
fn | (value : T , key : string , collection : Store <T >) => value is V2 |
Returns
this is Collection<string, V2>
Inherited from
Collection.every
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:266
▸ every(fn
): boolean
Parameters
Name | Type |
---|---|
fn | (value : T , key : string , collection : Store <T >) => boolean |
Returns
boolean
Inherited from
Collection.every
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:267
▸ every<This
, K2
>(fn
, thisArg
): this is Collection<K2, T>
Type parameters
Name | Type |
---|---|
This | This |
K2 | extends string |
Parameters
Name | Type |
---|---|
fn | (this : This , value : T , key : string , collection : Store <T >) => key is K2 |
thisArg | This |
Returns
this is Collection<K2, T>
Inherited from
Collection.every
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:268
▸ every<This
, V2
>(fn
, thisArg
): this is Collection<string, V2>
Type parameters
Name | Type |
---|---|
This | This |
V2 | extends Piece <PieceOptions , V2 > |
Parameters
Name | Type |
---|---|
fn | (this : This , value : T , key : string , collection : Store <T >) => value is V2 |
thisArg | This |
Returns
this is Collection<string, V2>
Inherited from
Collection.every
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:269
▸ every<This
>(fn
, thisArg
): boolean
Type parameters
Name |
---|
This |
Parameters
Name | Type |
---|---|
fn | (this : This , value : T , key : string , collection : Store <T >) => boolean |
thisArg | This |
Returns
boolean
Inherited from
Collection.every
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:270
filter
▸ filter<K2
>(fn
): Collection
<K2
, T
>
Type parameters
Name | Type |
---|---|
K2 | extends string |
Parameters
Name | Type | Description |
---|---|---|
fn | (value : T , key : string , collection : Store <T >) => key is K2 |
Returns
Collection
<K2
, T
>
Inherited from
Collection.filter
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:185
▸ filter<V2
>(fn
): Collection
<string
, V2
>
Type parameters
Name | Type |
---|---|
V2 | extends Piece <PieceOptions , V2 > |
Parameters
Name | Type |
---|---|
fn | (value : T , key : string , collection : Store <T >) => value is V2 |
Returns
Collection
<string
, V2
>
Inherited from
Collection.filter
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:186
▸ filter(fn
): Collection
<string
, T
>
Parameters
Name | Type |
---|---|
fn | (value : T , key : string , collection : Store <T >) => boolean |
Returns
Collection
<string
, T
>
Inherited from
Collection.filter
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:187
▸ filter<This
, K2
>(fn
, thisArg
): Collection
<K2
, T
>
Type parameters
Name | Type |
---|---|
This | This |
K2 | extends string |
Parameters
Name | Type |
---|---|
fn | (this : This , value : T , key : string , collection : Store <T >) => key is K2 |
thisArg | This |
Returns
Collection
<K2
, T
>
Inherited from
Collection.filter
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:188
▸ filter<This
, V2
>(fn
, thisArg
): Collection
<string
, V2
>
Type parameters
Name | Type |
---|---|
This | This |
V2 | extends Piece <PieceOptions , V2 > |
Parameters
Name | Type |
---|---|
fn | (this : This , value : T , key : string , collection : Store <T >) => value is V2 |
thisArg | This |
Returns
Collection
<string
, V2
>
Inherited from
Collection.filter
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:189
▸ filter<This
>(fn
, thisArg
): Collection
<string
, T
>
Type parameters
Name |
---|
This |
Parameters
Name | Type |
---|---|
fn | (this : This , value : T , key : string , collection : Store <T >) => boolean |
thisArg | This |
Returns
Collection
<string
, T
>
Inherited from
Collection.filter
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:190
find
▸ find<V2
>(fn
): undefined
| V2
Type parameters
Name | Type |
---|---|
V2 | extends Piece <PieceOptions , V2 > |
Parameters
Name | Type | Description |
---|---|---|
fn | (value : T , key : string , collection : Store <T >) => value is V2 |
Returns
undefined
| V2
Inherited from
Collection.find
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:145
▸ find(fn
): undefined
| T
Parameters
Name | Type |
---|---|
fn | (value : T , key : string , collection : Store <T >) => boolean |
Returns
undefined
| T
Inherited from
Collection.find
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:146
▸ find<This
, V2
>(fn
, thisArg
): undefined
| V2
Type parameters
Name | Type |
---|---|
This | This |
V2 | extends Piece <PieceOptions , V2 > |
Parameters
Name | Type |
---|---|
fn | (this : This , value : T , key : string , collection : Store <T >) => value is V2 |
thisArg | This |
Returns
undefined
| V2
Inherited from
Collection.find
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:147
▸ find<This
>(fn
, thisArg
): undefined
| T
Type parameters
Name |
---|
This |
Parameters
Name | Type |
---|---|
fn | (this : This , value : T , key : string , collection : Store <T >) => boolean |
thisArg | This |
Returns
undefined
| T
Inherited from
Collection.find
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:148
findKey
▸ findKey<K2
>(fn
): undefined
| K2
Type parameters
Name | Type |
---|---|
K2 | extends string |
Parameters
Name | Type | Description |
---|---|---|
fn | (value : T , key : string , collection : Store <T >) => key is K2 |
Returns
undefined
| K2
Inherited from
Collection.findKey
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:160
▸ findKey(fn
): undefined
| string
Parameters
Name | Type |
---|---|
fn | (value : T , key : string , collection : Store <T >) => boolean |
Returns
undefined
| string
Inherited from
Collection.findKey
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:161
▸ findKey<This
, K2
>(fn
, thisArg
): undefined
| K2
Type parameters
Name | Type |
---|---|
This | This |
K2 | extends string |
Parameters
Name | Type |
---|---|
fn | (this : This , value : T , key : string , collection : Store <T >) => key is K2 |
thisArg | This |
Returns
undefined
| K2
Inherited from
Collection.findKey
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:162
▸ findKey<This
>(fn
, thisArg
): undefined
| string
Type parameters
Name |
---|
This |
Parameters
Name | Type |
---|---|
fn | (this : This , value : T , key : string , collection : Store <T >) => boolean |
thisArg | This |
Returns
undefined
| string
Inherited from
Collection.findKey
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:163
first
▸ first(): undefined
| T
Returns
undefined
| T
Inherited from
Collection.first
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:61
▸ first(amount
): T
[]
Parameters
Name | Type |
---|---|
amount | number |
Returns
T
[]
Inherited from
Collection.first
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:62
firstKey
▸ firstKey(): undefined
| string
Returns
undefined
| string
Inherited from
Collection.firstKey
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:71
▸ firstKey(amount
): string
[]
Parameters
Name | Type |
---|---|
amount | number |
Returns
string
[]
Inherited from
Collection.firstKey
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:72
flatMap
▸ flatMap<T
>(fn
): Collection
<string
, T
>
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
fn | (value : T , key : string , collection : Store <T >) => Collection <string , T > |
Returns
Collection
<string
, T
>
Inherited from
Collection.flatMap
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:217
▸ flatMap<T
, This
>(fn
, thisArg
): Collection
<string
, T
>
Type parameters
Name |
---|
T |
This |
Parameters
Name | Type |
---|---|
fn | (this : This , value : T , key : string , collection : Store <T >) => Collection <string , T > |
thisArg | This |
Returns
Collection
<string
, T
>
Inherited from
Collection.flatMap
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:218
forEach
▸ forEach(callbackfn
, thisArg?
): void
Parameters
Name | Type |
---|---|
callbackfn | (value : T , key : string , map : Map <string , T >) => void |
thisArg? | any |
Returns
void
Inherited from
Collection.forEach
Defined in
node_modules/typescript/lib/lib.es2015.collection.d.ts:24
get
▸ get(key
): undefined
| T
Parameters
Name | Type |
---|---|
key | string |
Returns
undefined
| T
Inherited from
Collection.get
Defined in
node_modules/typescript/lib/lib.es2015.collection.d.ts:25
has
▸ has(key
): boolean
Parameters
Name | Type |
---|---|
key | string |
Returns
boolean
Inherited from
Collection.has
Defined in
node_modules/typescript/lib/lib.es2015.collection.d.ts:26
hasAll
▸ hasAll(...keys
): boolean
Parameters
Name | Type | Description |
---|---|---|
...keys | string [] |
Returns
boolean
Inherited from
Collection.hasAll
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:45
hasAny
▸ hasAny(...keys
): boolean
Parameters
Name | Type | Description |
---|---|---|
...keys | string [] |
Returns
boolean
Inherited from
Collection.hasAny
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:53
hydrateModuleData
▸ Private
hydrateModuleData(root
, data
): HydratedModuleData
Parameters
Name | Type | Description |
---|---|---|
root | string | |
data | ModuleData |
Returns
Defined in
projects/pieces/src/lib/structures/Store.ts:251
insert
▸ insert(piece
): Promise
<T
>
Parameters
Name | Type | Description |
---|---|---|
piece | T |
Returns
Promise
<T
>
Defined in
projects/pieces/src/lib/structures/Store.ts:204
intersect
▸ intersect<T
>(other
): Collection
<string
, T
>
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
other | ReadonlyCollection <string , T > |
Returns
Collection
<string
, T
>
Inherited from
Collection.intersect
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:356
keyAt
▸ keyAt(index
): undefined
| string
Parameters
Name | Type | Description |
---|---|---|
index | number |
Returns
undefined
| string
Inherited from
Collection.keyAt
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:108
keys
▸ keys(): IterableIterator
<string
>
Returns
IterableIterator
<string
>
Inherited from
Collection.keys
Defined in
node_modules/typescript/lib/lib.es2015.iterable.d.ts:131
last
▸ last(): undefined
| T
Returns
undefined
| T
Inherited from
Collection.last
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:81
▸ last(amount
): T
[]
Parameters
Name | Type |
---|---|
amount | number |
Returns
T
[]
Inherited from
Collection.last
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:82
lastKey
▸ lastKey(): undefined
| string
Returns
undefined
| string
Inherited from
Collection.lastKey
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:91
▸ lastKey(amount
): string
[]
Parameters
Name | Type |
---|---|
amount | number |
Returns
string
[]
Inherited from
Collection.lastKey
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:92
load
▸ load(root
, path
): Promise
<T
[]>
Parameters
Name | Type | Description |
---|---|---|
root | string | |
path | string |
Returns
Promise
<T
[]>
Defined in
projects/pieces/src/lib/structures/Store.ts:103
loadAll
▸ loadAll(): Promise
<void
>
Returns
Promise
<void
>
Defined in
projects/pieces/src/lib/structures/Store.ts:158
loadPath
▸ Private
loadPath(root
): AsyncIterableIterator
<T
>
Parameters
Name | Type | Description |
---|---|---|
root | string |
Returns
AsyncIterableIterator
<T
>
Defined in
projects/pieces/src/lib/structures/Store.ts:260
map
▸ map<T
>(fn
): T
[]
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
fn | (value : T , key : string , collection : Store <T >) => T |
Returns
T
[]
Inherited from
Collection.map
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:229
▸ map<This
, T
>(fn
, thisArg
): T
[]
Type parameters
Name |
---|
This |
T |
Parameters
Name | Type |
---|---|
fn | (this : This , value : T , key : string , collection : Store <T >) => T |
thisArg | This |
Returns
T
[]
Inherited from
Collection.map
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:230
mapValues
▸ mapValues<T
>(fn
): Collection
<string
, T
>
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
fn | (value : T , key : string , collection : Store <T >) => T |
Returns
Collection
<string
, T
>
Inherited from
Collection.mapValues
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:241
▸ mapValues<This
, T
>(fn
, thisArg
): Collection
<string
, T
>
Type parameters
Name |
---|
This |
T |
Parameters
Name | Type |
---|---|
fn | (this : This , value : T , key : string , collection : Store <T >) => T |
thisArg | This |
Returns
Collection
<string
, T
>
Inherited from
Collection.mapValues
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:242
merge
▸ merge<T
, R
>(other
, whenInSelf
, whenInOther
, whenInBoth
): Collection
<string
, R
>
Type parameters
Name |
---|
T |
R |
Parameters
Name | Type | Description |
---|---|---|
other | ReadonlyCollection <string , T > | |
whenInSelf | (value : T , key : string ) => Keep <R > | |
whenInOther | (valueOther : T , key : string ) => Keep <R > | |
whenInBoth | (value : T , valueOther : T , key : string ) => Keep <R > |
Returns
Collection
<string
, R
>
Inherited from
Collection.merge
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:388
partition
▸ partition<K2
>(fn
): [Collection
<K2
, T
>, Collection
<Exclude
<string
, K2
>, T
>]
Type parameters
Name | Type |
---|---|
K2 | extends string |
Parameters
Name | Type | Description |
---|---|---|
fn | (value : T , key : string , collection : Store <T >) => key is K2 |
Returns
[Collection
<K2
, T
>, Collection
<Exclude
<string
, K2
>, T
>]
Inherited from
Collection.partition
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:201
▸ partition<V2
>(fn
): [Collection
<string
, V2
>, Collection
<string
, Exclude
<T
, V2
>>]
Type parameters
Name | Type |
---|---|
V2 | extends Piece <PieceOptions , V2 > |
Parameters
Name | Type |
---|---|
fn | (value : T , key : string , collection : Store <T >) => value is V2 |
Returns
[Collection
<string
, V2
>, Collection
<string
, Exclude
<T
, V2
>>]
Inherited from
Collection.partition
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:202
▸ partition(fn
): [Collection
<string
, T
>, Collection
<string
, T
>]
Parameters
Name | Type |
---|---|
fn | (value : T , key : string , collection : Store <T >) => boolean |
Returns
[Collection
<string
, T
>, Collection
<string
, T
>]
Inherited from
Collection.partition
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:203
▸ partition<This
, K2
>(fn
, thisArg
): [Collection
<K2
, T
>, Collection
<Exclude
<string
, K2
>, T
>]
Type parameters
Name | Type |
---|---|
This | This |
K2 | extends string |
Parameters
Name | Type |
---|---|
fn | (this : This , value : T , key : string , collection : Store <T >) => key is K2 |
thisArg | This |
Returns
[Collection
<K2
, T
>, Collection
<Exclude
<string
, K2
>, T
>]
Inherited from
Collection.partition
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:204
▸ partition<This
, V2
>(fn
, thisArg
): [Collection
<string
, V2
>, Collection
<string
, Exclude
<T
, V2
>>]
Type parameters
Name | Type |
---|---|
This | This |
V2 | extends Piece <PieceOptions , V2 > |
Parameters
Name | Type |
---|---|
fn | (this : This , value : T , key : string , collection : Store <T >) => value is V2 |
thisArg | This |
Returns
[Collection
<string
, V2
>, Collection
<string
, Exclude
<T
, V2
>>]
Inherited from
Collection.partition
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:205
▸ partition<This
>(fn
, thisArg
): [Collection
<string
, T
>, Collection
<string
, T
>]
Type parameters
Name |
---|
This |
Parameters
Name | Type |
---|---|
fn | (this : This , value : T , key : string , collection : Store <T >) => boolean |
thisArg | This |
Returns
[Collection
<string
, T
>, Collection
<string
, T
>]
Inherited from
Collection.partition
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:206
random
▸ random(): undefined
| T
Returns
undefined
| T
Inherited from
Collection.random
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:116
▸ random(amount
): T
[]
Parameters
Name | Type |
---|---|
amount | number |
Returns
T
[]
Inherited from
Collection.random
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:117
randomKey
▸ randomKey(): undefined
| string
Returns
undefined
| string
Inherited from
Collection.randomKey
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:125
▸ randomKey(amount
): string
[]
Parameters
Name | Type |
---|---|
amount | number |
Returns
string
[]
Inherited from
Collection.randomKey
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:126
reduce
▸ reduce<T
>(fn
, initialValue?
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
fn | (accumulator : T , value : T , key : string , collection : Store <T >) => T | |
initialValue? | T |
Returns
T
Inherited from
Collection.reduce
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:282
registerPath
▸ registerPath(path
): Store
<T
>
Parameters
Name | Type | Description |
---|---|---|
path | Path |
Returns
Store
<T
>
Defined in
projects/pieces/src/lib/structures/Store.ts:89
resolve
▸ resolve(name
): T
Parameters
Name | Type | Description |
---|---|---|
name | string | T |
Returns
T
Defined in
projects/pieces/src/lib/structures/Store.ts:188
reverse
▸ reverse(): Store
<T
>
Returns
Store
<T
>
Inherited from
Collection.reverse
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:131
set
▸ set(key
, value
): Store
<T
>
Parameters
Name | Type |
---|---|
key | string |
value | T |
Returns
Store
<T
>
Inherited from
Collection.set
Defined in
node_modules/typescript/lib/lib.es2015.collection.d.ts:27
some
▸ some(fn
): boolean
Parameters
Name | Type | Description |
---|---|---|
fn | (value : T , key : string , collection : Store <T >) => boolean |
Returns
boolean
Inherited from
Collection.some
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:253
▸ some<T
>(fn
, thisArg
): boolean
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
fn | (this : T , value : T , key : string , collection : Store <T >) => boolean |
thisArg | T |
Returns
boolean
Inherited from
Collection.some
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:254
sort
▸ sort(compareFunction?
): Store
<T
>
Parameters
Name | Type | Description |
---|---|---|
compareFunction? | Comparator <string , T > |
Returns
Store
<T
>
Inherited from
Collection.sort
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:350
sorted
▸ sorted(compareFunction?
): Collection
<string
, T
>
Parameters
Name | Type | Description |
---|---|---|
compareFunction? | Comparator <string , T > |
Returns
Collection
<string
, T
>
Inherited from
Collection.sorted
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:401
sweep
▸ sweep(fn
): number
Parameters
Name | Type | Description |
---|---|---|
fn | (value : T , key : string , collection : Store <T >) => boolean |
Returns
number
Inherited from
Collection.sweep
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:172
▸ sweep<T
>(fn
, thisArg
): number
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
fn | (this : T , value : T , key : string , collection : Store <T >) => boolean |
thisArg | T |
Returns
number
Inherited from
Collection.sweep
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:173
tap
▸ tap(fn
): Store
<T
>
Parameters
Name | Type | Description |
---|---|---|
fn | (collection : Store <T >) => void |
Returns
Store
<T
>
Inherited from
Collection.tap
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:311
▸ tap<T
>(fn
, thisArg
): Store
<T
>
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
fn | (this : T , collection : Store <T >) => void |
thisArg | T |
Returns
Store
<T
>
Inherited from
Collection.tap
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:312
toJSON
▸ toJSON(): T
[]
Returns
T
[]
Inherited from
Collection.toJSON
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:402
unload
▸ unload(name
): Promise
<T
>
Parameters
Name | Type | Description |
---|---|---|
name | string | T |
Returns
Promise
<T
>
Defined in
projects/pieces/src/lib/structures/Store.ts:125
unloadAll
▸ unloadAll(): Promise
<T
[]>
Returns
Promise
<T
[]>
Defined in
projects/pieces/src/lib/structures/Store.ts:142
values
▸ values(): IterableIterator
<T
>
Returns
IterableIterator
<T
>
Inherited from
Collection.values
Defined in
node_modules/typescript/lib/lib.es2015.iterable.d.ts:136
walk
▸ Private
walk(path
): AsyncIterableIterator
<string
>
Parameters
Name | Type | Description |
---|---|---|
path | string |
Returns
AsyncIterableIterator
<string
>
Defined in
projects/pieces/src/lib/structures/Store.ts:284
combineEntries
▸ Static
combineEntries<K
, V
>(entries
, combine
): Collection
<K
, V
>
Type parameters
Name |
---|
K |
V |
Parameters
Name | Type | Description |
---|---|---|
entries | Iterable <[K , V ]> | |
combine | (firstValue : V , secondValue : V , key : K ) => V |
Returns
Collection
<K
, V
>
Inherited from
Collection.combineEntries
Defined in
node_modules/@discordjs/collection/dist/collection.d.ts:414