Skip to main content

Interface: LoaderPieceContext<StoreName>

The context for the piece, contains extra information from the store, the piece's path, and the store that loaded it.

Type parameters

NameType
StoreNameextends StoreRegistryKey = StoreRegistryKey

Hierarchy

Properties

name

Readonly name: string

The module's name extracted from the path.

Defined in

node_modules/@sapphire/pieces/dist/index.d.ts:141


path

Readonly path: string

The path the module was loaded from, relative to LoaderPieceContext.root.

Defined in

node_modules/@sapphire/pieces/dist/index.d.ts:137


root

Readonly root: string

The root directory the piece was loaded from.

Defined in

node_modules/@sapphire/pieces/dist/index.d.ts:133


store

Readonly store: StoreRegistryEntries[StoreName]

The store that loaded the piece.

Defined in

node_modules/@sapphire/pieces/dist/index.d.ts:145