pixi-reels

API reference

PhaseOptionsOf

pixi-reels


pixi-reels / index / PhaseOptionsOf

type PhaseOptionsOf<C> = C extends (reel: never, speed: never, options?: infer O) => unknown ? O : never;

Defined in: spin/phases/PhaseFactory.ts:26

The options a phase constructor takes as its third argument, read off the class itself. Reading it from the class rather than declaring it as a separate type parameter is what gives register’s options argument its contextual type AND works for a phase generic over its profile (StopPhase<TProfile>), which a plain parameter cannot do for both.

Type Parameters#

Type Parameter
C