Type Alias: HashtagHandler
> HashtagHandler = (command, props, convertListStringToObj) => boolean | string | Promise<boolean | string>
Defined in: src/handlers/interfaces/HashtagHandler.ts:19
A handler function invoked for each Hashtag-Command that passes the HashtagHandlerOptions.validation check.
Parameters
command
string[]
The Hashtag-Command split into tokens. Corresponds to a line starting with #.
For example # navigate scene_name "Hello World" becomes ["navigate", "scene_name", "Hello World"].
Use "" to embed a literal space inside a single token.
props
StepLabelProps
The properties of the current step.
convertListStringToObj
(listParm) => object
Utility function that converts an alternating key/value list into
a plain object. For example ["name", "John", "age", "20"] → { name: "John", age: 20 }.
Returns
boolean | string | Promise<boolean | string>
true– the command was handled; stop processing further handlers and skip the default interpreter.- A
string– treat the returned value as a new Hashtag-Command and re-interpret it. false/Promise<false>– not handled; pass to the next registered handler.
- A