Skip to Content
APIUtilsType Alias: BasicCategory

Type Alias: BasicCategory

type BasicCategory = Basic | BasicWithLogo | BasicWithIcon | BasicWithImageUrl

Holds the basic information of a category: its id, name and an optional description.

A category may optionally carry a graphical representation, but it is not required. Depending on the available asset, a BasicCategory can be one of:

  • BasicWithLogo — the category provides a logo image (URL).
  • BasicWithIcon — the category provides a Font Awesome icon name (and optional style).
  • BasicWithImageUrl — the category provides an image URL for its icon.
  • Basic — the category carries no graphical information at all.

Use the isBasicWithLogo, isBasicWithIcon and isBasicWithImageUrl type guards to narrow a BasicCategory and safely access its graphical asset.

Last updated on