NarraLeaf

SoundBusId

type SoundBusId = SoundType | (string & {});

The audio bus a clip plays on, as given by ISoundUserConfig.type.

The three SoundType values are buses the engine always seeds, and they mean exactly what they have always meant. Any other string is a bus the host declared in GameConfig.audioBuses"alice" under "voice", "ambience" under "bgm", as deep as makes sense.

The (string & {}) half is what widens the type without giving up the completions: an editor still offers "bgm" | "sound" | "voice" first, and a SoundType still narrows where one is expected.

Sound.voice({src: "alice-01.mp3", type: "alice"});

Added in 0.23.0. Sound.config.type used to be SoundType. SoundType is unchanged and still exported, so existing code keeps type-checking.