mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-19 05:31:56 +02:00
Fix TS documentation
This commit is contained in:
@@ -32,13 +32,13 @@ Using best practices, the custom types will look something like:
|
|||||||
```ts
|
```ts
|
||||||
export type ParagraphElement = {
|
export type ParagraphElement = {
|
||||||
type: 'paragraph'
|
type: 'paragraph'
|
||||||
children: Descendant
|
children: CustomText[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export type HeadingElement = {
|
export type HeadingElement = {
|
||||||
type: 'paragraph'
|
type: 'heading'
|
||||||
level: number
|
level: number
|
||||||
children: Descendant
|
children: CustomText[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export type CustomElement = ParagraphElement | HeadingElement
|
export type CustomElement = ParagraphElement | HeadingElement
|
||||||
|
Reference in New Issue
Block a user