From a4cbc7ed2da44a7eac90bf99b21d9be97037a7fa Mon Sep 17 00:00:00 2001 From: Brent Farese <25846953+BrentFarese@users.noreply.github.com> Date: Fri, 11 Dec 2020 15:59:54 -0500 Subject: [PATCH] Fix TS type errors. (#4014) Fix for https://github.com/ianstormtaylor/slate/issues/4003 --- packages/slate/src/interfaces/editor.ts | 10 +++++++++- packages/slate/src/interfaces/path.ts | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/slate/src/interfaces/editor.ts b/packages/slate/src/interfaces/editor.ts index ca72db596..5bc12f2b1 100755 --- a/packages/slate/src/interfaces/editor.ts +++ b/packages/slate/src/interfaces/editor.ts @@ -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 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, diff --git a/packages/slate/src/interfaces/path.ts b/packages/slate/src/interfaces/path.ts index d5de7be58..9e20dde24 100755 --- a/packages/slate/src/interfaces/path.ts +++ b/packages/slate/src/interfaces/path.ts @@ -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