LogoPixi’VN
indexType aliases

Type Alias: CharacterIdType

> CharacterIdType = [keyof PixivnCharacterIds] extends [never] ? string : keyof PixivnCharacterIds

Defined in: src/characters/types/CharacterIdType.ts:38

The type used wherever a character ID is expected (e.g. RegisteredCharacters.get, RegisteredCharacters.has, character constructors, …).

  • Default — resolves to string so that existing code that passes arbitrary strings continues to compile without any changes.
  • Augmented — when PixivnCharacterIds has been extended via declare module "@drincs/pixi-vn/characters", this type resolves to the union of the declared keys, giving you compile-time safety against typos and unknown character IDs.