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



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

Defined in: [src/characters/types/CharacterIdType.ts:38](https://github.com/DRincs-Productions/pixi-vn/blob/11c55b5d212c6c7eaffb12776b3f83f4d38e1ede/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](/jsdoc/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.
