Class: AliasPiece<Options, StoreName>
Defined in: projects/pieces/src/lib/structures/AliasPiece.ts:15
The piece to be stored in AliasStore instances.
Extends
- Piece<- Options,- StoreName>
Type Parameters
| Type Parameter | Default type | 
|---|---|
| OptionsextendsAliasPieceOptions | AliasPieceOptions | 
| StoreNameextendsStoreRegistryKey | StoreRegistryKey | 
Constructors
Constructor
new AliasPiece<
Options,StoreName>(context:LoaderContext<StoreName>,options:AliasPieceOptions):AliasPiece<Options,StoreName>
Defined in: projects/pieces/src/lib/structures/AliasPiece.ts:24
Parameters
| Parameter | Type | 
|---|---|
| context | LoaderContext<StoreName> | 
| options | AliasPieceOptions | 
Returns
AliasPiece<Options, StoreName>
Overrides
Properties
aliases
aliases: readonly
string[]
Defined in: projects/pieces/src/lib/structures/AliasPiece.ts:22
The aliases for the piece.
enabled
enabled:
boolean
Defined in: projects/pieces/src/lib/structures/Piece.ts:75
Whether or not the piece is enabled.
Inherited from
location
readonlylocation:PieceLocation
Defined in: projects/pieces/src/lib/structures/Piece.ts:65
The location metadata for the piece's file.
Inherited from
name
readonlyname:string
Defined in: projects/pieces/src/lib/structures/Piece.ts:70
The name of the piece.
Inherited from
options
readonlyoptions:Options
Defined in: projects/pieces/src/lib/structures/Piece.ts:80
The raw options passed to this Piece
Inherited from
store
readonlystore:StoreOf<StoreName>
Defined in: projects/pieces/src/lib/structures/Piece.ts:60
The store that contains the piece.
Inherited from
Accessors
container
Get Signature
get container():
Container
Defined in: projects/pieces/src/lib/structures/Piece.ts:94
A reference to the Container object for ease of use.
See
container
Returns
Inherited from
Methods
onLoad()
onLoad():
unknown
Defined in: projects/pieces/src/lib/structures/Piece.ts:102
Per-piece listener that is called when the piece is loaded into the store. Useful to set-up asynchronous initialization tasks.
Returns
unknown
Inherited from
onUnload()
onUnload():
unknown
Defined in: projects/pieces/src/lib/structures/Piece.ts:110
Per-piece listener that is called when the piece is unloaded from the store. Useful to set-up clean-up tasks.
Returns
unknown
Inherited from
reload()
reload():
Promise<void>
Defined in: projects/pieces/src/lib/structures/Piece.ts:125
Reloads the piece by loading the same path in the store.
Returns
Promise<void>
Inherited from
toJSON()
toJSON():
AliasPieceJSON
Defined in: projects/pieces/src/lib/structures/AliasPiece.ts:32
Defines the JSON.stringify behavior of this alias piece.
Returns
Overrides
unload()
unload():
Promise<void>
Defined in: projects/pieces/src/lib/structures/Piece.ts:117
Unloads and disables the piece.
Returns
Promise<void>