declaredDefault

Returns the default an attribute is declared with on a registered node, as written in its spec, or undefined where it declares none.

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

What a renderer falls back to where a value is absent — a node built without the compiler, which fills declared defaults in — so the picture and the spec agree on what an unset attribute looks like.

#Signature

(nodeIdentifier: string, attrIdentifier: string): unknown

#Parameters

nodeIdentifier
The node's identifier, such as scatter.
attrIdentifier
The attribute's canonical name.

Declared in packages/canvas-sdk/src/environment/registry.ts:479.

Last updated