LogoPixi’VN
indexType aliases

Type Alias: MapperHandler

> MapperHandler = (list, step) => PixiVNJsonOperation | undefined

Defined in: src/handlers/interfaces/HashtagHandler.ts:53

A mapper function that converts a specific Hashtag-Command token list into a PixiVNJsonOperation (or undefined when the command only modifies the step without producing an operation, e.g. call / jump).

Unlike HashtagHandler, a mapper is purely synchronous and is selected by its validation rule rather than deciding for itself whether to handle the command. The selection logic in HashtagCommands.convertOperation tests each mapper's HashtagHandlerOptions.validation against the full token list; only the first matching mapper is called.

Parameters

list

string[]

step

PixiVNJsonLabelStep

Returns

PixiVNJsonOperation | undefined

The PixiVNJsonOperation to enqueue, or undefined if the command only produces side-effects on step (such as setting labelToOpen).

On this page