Skip to main content

ExtensionInitState

interface

An object that the init method can use to access the configuration for extension dependencies

interface ExtensionInitState

Import

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

Members4

getDependency
<Dependency extends AnyLexicalExtension>(dep: Dependency) => Omit<LexicalExtensionDependency<Dependency>, 'output' | 'init'>

Get the configuration of a dependency by extension (must be a direct dependency of this extension)

getDirectDependentNames
() => ReadonlySet<string>

Get the names of any direct dependents of this Extension, typically only used for error messages.

getPeer
<Dependency extends AnyLexicalExtension = never>(name: Dependency['name']) => undefined | Omit<LexicalExtensionDependency<Dependency>, 'output' | 'init'>

Get the result of a peerDependency by name, if it exists (must be a peerDependency of this extension)

getPeerNameSet
() => ReadonlySet<string>

Get the names of all peer dependencies of this Extension, even if they do not exist in the builder, typically only used for devtools.