Skip to content

getTokenCategory

function getTokenCategory(tokenType):
| TokenCategory
| undefined;

Defined in: packages/engine/src/language/TokenCategoryMap.ts:323

Resolve a token type to its semantic category, checking plugin-contributed categories first (so a plugin could theoretically re-categorize a builtin token type, though in practice plugins only ever add categories for their own new types).

ParameterType
tokenTypestring

| TokenCategory | undefined

The category, or undefined if the token type has no category the signal to a UI adapter that this token should render unstyled.