Skip to main content

getDeclaredSlots

function

Returns the canonical slot declaration for a node class: the `slots` array from the nearest StaticNodeConfigValue in its prototype chain (a subclass redeclaration overrides its ancestors'), or an empty array when nothing is declared. The declaration is an ordering vocabulary, not a schema — occupied names outside it are still valid and sort after the declared names in code-unit order.

function getDeclaredSlots(klass: Klass<LexicalNode>): readonly string[]

Import

import { getDeclaredSlots } from '@modular/sdk/editor';