Skip to content

Cm5Mode.getType method

Cm5Mode › getType

Unofficial

Returns the token type of the current state, for modes that expose one.

Signature:

getType(state: T): null | string

Parameters:

ParameterTypeDescription
stateTThe current parser state.

Returns: null | stringThe token type, or null when the state has none.