mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-26 16:44:22 +02:00
add import Descendant in TS docs
This commit is contained in:
@@ -9,6 +9,8 @@ If you need to support more than one document model, see the section Multiple Do
|
|||||||
To define a custom `Element` or `Text` type, extend the `CustomTypes` interface in the `slate` module like this.
|
To define a custom `Element` or `Text` type, extend the `CustomTypes` interface in the `slate` module like this.
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
|
import { Descendant } from 'slate'
|
||||||
|
|
||||||
declare module 'slate' {
|
declare module 'slate' {
|
||||||
interface CustomTypes {
|
interface CustomTypes {
|
||||||
Element: { type: 'paragraph'; children: Descendant[] }
|
Element: { type: 'paragraph'; children: Descendant[] }
|
||||||
|
Reference in New Issue
Block a user