mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-20 22:21:20 +02:00
Fix TS type errors. (#4014)
Fix for https://github.com/ianstormtaylor/slate/issues/4003
This commit is contained in:
@@ -83,6 +83,7 @@ export interface EditorInterface {
|
|||||||
options?: {
|
options?: {
|
||||||
distance?: number
|
distance?: number
|
||||||
unit?: 'offset' | 'character' | 'word' | 'line' | 'block'
|
unit?: 'offset' | 'character' | 'word' | 'line' | 'block'
|
||||||
|
voids?: boolean
|
||||||
}
|
}
|
||||||
) => Point | undefined
|
) => Point | undefined
|
||||||
before: (
|
before: (
|
||||||
@@ -91,6 +92,7 @@ export interface EditorInterface {
|
|||||||
options?: {
|
options?: {
|
||||||
distance?: number
|
distance?: number
|
||||||
unit?: 'offset' | 'character' | 'word' | 'line' | 'block'
|
unit?: 'offset' | 'character' | 'word' | 'line' | 'block'
|
||||||
|
voids?: boolean
|
||||||
}
|
}
|
||||||
) => Point | undefined
|
) => Point | undefined
|
||||||
deleteBackward: (
|
deleteBackward: (
|
||||||
@@ -246,7 +248,13 @@ export interface EditorInterface {
|
|||||||
rangeRefs: (editor: Editor) => Set<RangeRef>
|
rangeRefs: (editor: Editor) => Set<RangeRef>
|
||||||
removeMark: (editor: Editor, key: string) => void
|
removeMark: (editor: Editor, key: string) => void
|
||||||
start: (editor: Editor, at: Location) => Point
|
start: (editor: Editor, at: Location) => Point
|
||||||
string: (editor: Editor, at: Location) => string
|
string: (
|
||||||
|
editor: Editor,
|
||||||
|
at: Location,
|
||||||
|
options?: {
|
||||||
|
voids?: boolean
|
||||||
|
}
|
||||||
|
) => string
|
||||||
unhangRange: (
|
unhangRange: (
|
||||||
editor: Editor,
|
editor: Editor,
|
||||||
range: Range,
|
range: Range,
|
||||||
|
@@ -17,6 +17,7 @@ export interface PathInterface {
|
|||||||
endsAt: (path: Path, another: Path) => boolean
|
endsAt: (path: Path, another: Path) => boolean
|
||||||
endsBefore: (path: Path, another: Path) => boolean
|
endsBefore: (path: Path, another: Path) => boolean
|
||||||
equals: (path: Path, another: Path) => boolean
|
equals: (path: Path, another: Path) => boolean
|
||||||
|
hasPrevious: (path: Path) => boolean
|
||||||
isAfter: (path: Path, another: Path) => boolean
|
isAfter: (path: Path, another: Path) => boolean
|
||||||
isAncestor: (path: Path, another: Path) => boolean
|
isAncestor: (path: Path, another: Path) => boolean
|
||||||
isBefore: (path: Path, another: Path) => boolean
|
isBefore: (path: Path, another: Path) => boolean
|
||||||
|
Reference in New Issue
Block a user