diff --git a/types/atom/atom-tests.ts b/types/atom/atom-tests.ts index feb6d9fe31..9a04b9c7b6 100644 --- a/types/atom/atom-tests.ts +++ b/types/atom/atom-tests.ts @@ -17,7 +17,6 @@ declare const mouseEvent: MouseEvent; declare let buffer: Atom.TextBuffer; declare const color: Atom.Color; -declare let maybeCursor: Atom.Cursor | undefined; declare let cursor: Atom.Cursor; declare let cursors: Atom.Cursor[]; declare let decoration: Atom.Decoration; @@ -2790,7 +2789,7 @@ function testTextEditor() { editor.moveToBeginningOfPreviousParagraph(); editor.selectLargerSyntaxNode(); editor.selectSmallerSyntaxNode(); - maybeCursor = editor.getLastCursor(); + cursor = editor.getLastCursor(); str = editor.getWordUnderCursor(); str = editor.getWordUnderCursor({}); diff --git a/types/atom/index.d.ts b/types/atom/index.d.ts index 3e2b8f33d5..fb230420c0 100644 --- a/types/atom/index.d.ts +++ b/types/atom/index.d.ts @@ -1939,7 +1939,7 @@ export class TextEditor { moveToBeginningOfPreviousParagraph(): void; /** Returns the most recently added Cursor. */ - getLastCursor(): Cursor | undefined; + getLastCursor(): Cursor; /** Returns the word surrounding the most recently added cursor. */ getWordUnderCursor(options?: {