Skip to main content

Interface: ExtensionInitState

An object that the register method can use to detect unmount and access the configuration for extension dependencies

Properties

getDependency()

getDependency: <Dependency>(dep) => Omit<LexicalExtensionDependency<Dependency>, "output">

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

Type Parameters

Dependency extends AnyLexicalExtension

Parameters

dep: Dependency

Returns

Omit<LexicalExtensionDependency<Dependency>, "output">

Defined in

types.ts:80


getDirectDependentNames()

getDirectDependentNames: () => ReadonlySet<string>

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

Returns

ReadonlySet<string>

Defined in

types.ts:87


getPeer()

getPeer: <Dependency>(name) => undefined | Omit<LexicalExtensionDependency<Dependency>, "output">

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

Type Parameters

Dependency extends AnyLexicalExtension = never

Parameters

name: Dependency["name"]

Returns

undefined | Omit<LexicalExtensionDependency<Dependency>, "output">

Defined in

types.ts:73


getPeerNameSet()

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.

Returns

ReadonlySet<string>

Defined in

types.ts:93


signal

signal: AbortSignal

An AbortSignal that is aborted when the LexicalEditor is disposed

Defined in

types.ts:68