Skip to content

Type Editor


Type Editor / @type-editor/markdown / types/TokenHandler / TokenHandler

Type Alias: TokenHandler()

ts
type TokenHandler = (state, token, tokens, i) => void;

Defined in: types/TokenHandler.ts:14

Function type for handling a specific markdown-it token during parsing.

Parameters

ParameterTypeDescription
stateMarkdownParseStateThe current parse state.
tokenTokenThe token being processed.
tokensToken[]The complete array of tokens.
inumberThe index of the current token in the tokens array.

Returns

void