1
0
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:
Sunny Hirai
2021-03-13 12:27:59 -08:00
parent 73368a452f
commit 03e774bed8

View File

@@ -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.
```ts
import { Descendant } from 'slate'
declare module 'slate' {
interface CustomTypes {
Element: { type: 'paragraph'; children: Descendant[] }