1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-19 13:41:19 +02:00

Fix TS type errors. (#4014)

Fix for https://github.com/ianstormtaylor/slate/issues/4003
This commit is contained in:
Brent Farese
2020-12-11 15:59:54 -05:00
committed by GitHub
parent db3f52517f
commit a4cbc7ed2d
2 changed files with 10 additions and 1 deletions

View File

@@ -83,6 +83,7 @@ export interface EditorInterface {
options?: {
distance?: number
unit?: 'offset' | 'character' | 'word' | 'line' | 'block'
voids?: boolean
}
) => Point | undefined
before: (
@@ -91,6 +92,7 @@ export interface EditorInterface {
options?: {
distance?: number
unit?: 'offset' | 'character' | 'word' | 'line' | 'block'
voids?: boolean
}
) => Point | undefined
deleteBackward: (
@@ -246,7 +248,13 @@ export interface EditorInterface {
rangeRefs: (editor: Editor) => Set<RangeRef>
removeMark: (editor: Editor, key: string) => void
start: (editor: Editor, at: Location) => Point
string: (editor: Editor, at: Location) => string
string: (
editor: Editor,
at: Location,
options?: {
voids?: boolean
}
) => string
unhangRange: (
editor: Editor,
range: Range,

View File

@@ -17,6 +17,7 @@ export interface PathInterface {
endsAt: (path: Path, another: Path) => boolean
endsBefore: (path: Path, another: Path) => boolean
equals: (path: Path, another: Path) => boolean
hasPrevious: (path: Path) => boolean
isAfter: (path: Path, another: Path) => boolean
isAncestor: (path: Path, another: Path) => boolean
isBefore: (path: Path, another: Path) => boolean