refineInternoteDocument

Refines a freshly compiled internote in place, re-parsing custom-typed attribute values into the shapes renderers read.

@internote/canvas-sdkFunction
On this page
import { refineInternoteDocument } from '@internote/canvas-sdk';

In order: deduplicates the header's tags, with more than seven an error; refines every attribute in the body, !cue.to keyframe chains included, through the language's refiners and every registered environment's; expands each sequential cue into one cue per element of its body; points bindings at pack-scoped datasets where the name alone is unambiguous; and writes the document's citations from its cite declarations. Idempotent: an already-refined document passes through unchanged. The compile service runs it before the semantic pass, and a host compiling with the language's compiler directly runs it itself.

#Signature

(document: ChalkDocument): RefineDocumentResult

#Parameters

document
The compiled document, which is changed in place.

#Returns

Success, or the first refinement error as a message.

Declared in packages/canvas-sdk/src/refine/refiners.ts:173.

Last updated