@sapphire/pieces v4.4.1
Namespaces
| Namespace | Description |
|---|---|
| AliasPiece | - |
| Piece | - |
| Store | - |
Enumerations
| Enumeration | Description |
|---|---|
| LoaderErrorType | - |
Classes
| Class | Description |
|---|---|
| AliasPiece | The piece to be stored in AliasStore instances. |
| AliasStore | The store class which contains AliasPieces. |
| LoaderError | Describes a loader error with a type for easy identification. |
| LoaderStrategy | A multi-purpose feature-complete loader strategy supporting multi-piece modules as well as supporting both ECMAScript Modules and CommonJS with reloading support. |
| MissingExportsError | Describes a LoaderErrorType.EmptyModule loader error and adds a path for easy identification. |
| Piece | The piece to be stored in Store instances. |
| PieceLocation | The metadata class used for Pieces. |
| Store | The store class which contains Pieces. |
| StoreRegistry | A strict-typed store registry. This is available in container. |
Interfaces
| Interface | Description |
|---|---|
| AliasPieceJSON | The return type of AliasPiece.toJSON. |
| AliasPieceOptions | - |
| Container | Represents the type of the properties injected into the container, which is available at container. |
| HydratedModuleData | The hydrated module data. |
| ILoaderStrategy | An abstracted loader strategy interface. |
| LoaderPieceContext | The context for the piece, contains extra information from the store, the piece's path, and the store that loaded it. |
| ModuleData | The module data information. |
| - | |
| PieceJSON | The return type of Piece.toJSON. |
| PieceLocationJSON | The return type of PieceLocation.toJSON. |
| PieceOptions | The options for the Piece. |
| RootData | Represents the root data. |
| StoreLogger | An interface representing a logger function. |
| StoreManagerManuallyRegisteredPiece | An entry for a manually registered piece using (). |
| StoreManuallyRegisteredPiece | An entry for a manually registered piece using (). |
| StoreOptions | The options for the store, this features both hooks (changes the behaviour) and handlers (similar to event listeners). |
| StoreRegistryEntries | The StoreRegistry's registry, use module augmentation against this interface when adding new stores. |
Type Aliases
| Type Alias | Description |
|---|---|
| AsyncPreloadResult | Represents the return data from ILoaderStrategy.preload |
| FilterResult | The result from the filter. |
| ILoaderResult | Represents the return data from ILoaderStrategy.load. |
| ILoaderResultEntry | Represents an entry from ILoaderResult. |
| PieceOf | Type utility to get the Piece given its Store's name. |
| PreloadResult | Represents the return data from ILoaderStrategy.preload |
| StoreOf | Type utility to get the Store given its name. |
| StoreRegistryKey | A type utility to get the keys of StoreRegistryEntries. |
| StoreRegistryValue | A type utility to get the values of StoreRegistryEntries. |
Variables
| Variable | Description |
|---|---|
| container | The injected variables that will be accessible to any place. To add an extra property, simply add a property with a regular assignment, and it will be available in all places simultaneously. |
| VirtualPath | - |
Functions
| Function | Description |
|---|---|
| getRootData | - |
| parseRootData | Retrieves the root data of the project. |