Hoshimi
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:

What These Types Are

*Structure aliases represent the final instance type returned by each factory in Structures.

Practical Pattern

structure-types-usage.ts
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 CustomizableStructures predictable.

On this page