Skip to content

This site describes solve-engine as it is on main: 2.43.0, which npm does not have yet. npm installs 2.40.0, so a page may show an answer that version does not give yet.

getTokenCategory

function getTokenCategory(tokenType):
| TokenCategory
| undefined;

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

Resolve a token type to its semantic category, from the built-in table and the module-level table registerTokenCategory writes.

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.