# Type Alias: CharacterIdType (/pixi-vn/index/type-aliases/CharacterIdType)



\> **CharacterIdType** = \[keyof [`PixivnCharacterIds`](/pixi-vn/index/interfaces/PixivnCharacterIds)] *extends* \[`never`] ? `string` : keyof [`PixivnCharacterIds`](/pixi-vn/index/interfaces/PixivnCharacterIds)

Defined in: [src/characters/types/CharacterIdType.ts:38](https://github.com/DRincs-Productions/pixi-vn/blob/5bb5bb1f92e38998ea2f477b600168d8da3ece19/src/characters/types/CharacterIdType.ts#L38)

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](/pixi-vn/index/interfaces/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.
