From 2b62080d62146ef2fe145a948854b749ede0b78d Mon Sep 17 00:00:00 2001 From: Sean Zhu Date: Mon, 10 Sep 2018 14:46:21 -0700 Subject: [PATCH] [quill] getSelection can return undefined (#28736) --- types/quill/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/quill/index.d.ts b/types/quill/index.d.ts index 0eda9a4eff..d1fd85f4ba 100644 --- a/types/quill/index.d.ts +++ b/types/quill/index.d.ts @@ -186,7 +186,8 @@ export class Quill implements EventEmitter { blur(): void; focus(): void; getBounds(index: number, length?: number): BoundsStatic; - getSelection(focus?: boolean): RangeStatic; + getSelection(focus: true): RangeStatic; + getSelection(focus?: false): RangeStatic | null; hasFocus(): boolean; setSelection(index: number, length: number, source?: Sources): void; setSelection(range: RangeStatic, source?: Sources): void;