1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-12 02:03:59 +02:00

Allow Operation type to be extended (#4708)

* Allow Operation type to be extended

* fix lint

* add changeset
This commit is contained in:
Bryan Haakman
2021-12-04 16:54:16 +01:00
committed by GitHub
parent fece5c1570
commit 2fc7ad924c
7 changed files with 64 additions and 3 deletions

View File

@@ -0,0 +1,22 @@
---
'slate': patch
---
Allow `Operation` type to be extended
For example:
```
import type { BaseOperation } from 'slate'
type CustomOperation =
| BaseOperation
| YourCustomOperation
| AnotherCustomOperation
declare module 'slate' {
interface CustomTypes {
Operation: CustomOperation;
}
}
```