Advanced
Structure Types
Reference inferred structure types used by the Structures factory.
This entry summarizes the inferred *Structure aliases exposed by Hoshimi.
Use these types to keep extensions strongly typed when overriding built-in structures.
Type reference: Core API (TypeDoc)
Quick links:
- Structures
- InferCustomStructure
- PlayerStructure
- NodeStructure
- QueueStructure
- TrackStructure
- UnresolvedTrackStructure
- LyricsManagerStructure
- NodeManagerStructure
- FilterManagerStructure
- PlayerVoiceStateStructure
What These Types Are
*Structure aliases represent the final instance type returned by each factory in Structures.
Practical Pattern
import type { , } from 'hoshimi';
function (: ): void {
// Works with default Player or any custom Player replacement.
.(.);
}
function (: ): string {
return ..;
}Why It Matters
- Keeps extensions strongly typed after overrides.
- Avoids coupling app code to a concrete built-in class.
- Makes module augmentation with
CustomizableStructurespredictable.