withDocumentVariables

Runs fn with chalkVariables answering names, and restores what it answered before.

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

#Signature

<T>(names: readonly string[], fn: () => T): T

#Parameters

names
The letters the document's controls introduce.
fn
The work that types values with them bound.

Declared in packages/canvas-sdk/src/content/chalk-runtime.ts:193.

Last updated