toData
toData(
model:Model,options?:ToDataOptions):unknown
Emit any Model to a plain POJO / array / scalar tree — the supported
observation surface. Keys are YAML keys in canonical order (from the spec),
extras merged after ordered keys, Raw unwrapped to its inner value.
comments: false(default):Commentedwrappers are unwrapped to their values; the returned tree contains no framework wrapper types, so it is safe fortoEqual.comments: true: a node that carries a comment is returned as a CommentNode.
Any model may be passed (step, job, on, …). Dedent is NOT one of the
yaml-backend passes — emitEntries applies it during the shared
pre-backend collection stage that both toData and toYaml walk, so
this reproduces it exactly. Unlike toYaml, toData does not run the
yaml-backend passes (block-literal promotion, comment geometry) or
postProcess, which operate on the backend node; assert those via the YAML
string.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Section titled “Returns”unknown