UNPKG

@atlaskit/editor-common

Version:

A package that contains common classes and components for editor and renderer

11 lines (10 loc) 366 B
import type { PluginKey } from '@atlaskit/editor-prosemirror/state'; export type NamedPluginKeys = Readonly<{ [stateName: string]: PluginKey; }>; export type NamedPluginStates<P extends NamedPluginKeys> = Readonly<Partial<{ [K in keyof P]: P[K] extends PluginKey<infer T> ? T : never; }>>; export type Writeable<T> = { -readonly [P in keyof T]: T[P]; };