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.
AsConverter
type AsConverter = (value, context?) => Value;Defined in: packages/engine/src/vm/AsConverterRegistry.ts:15
A package-registered as <name> converter: the value on the left of as
in, the converted value out.
The optional context is the per-line execution context the VM passes to
a plugin function, handed to a converter for the same reason: a converter
that reads a date computes through the engine’s calendar backend on it
rather than a module-level default, so <date> as weekday and weekday on <date> cannot disagree. A converter that needs nothing from it ignores it.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value | Value |
context? | LineExecutionContext |