Skip to content

Commit c58d273

Browse files
authored
Merge pull request #131 from atom-community/update-@types/atom
chore: update @types/atom
2 parents c9fe78a + 94ae35e commit c58d273

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

lib/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { join, resolve } from "path"
22
import { existsSync } from "fs"
3-
import { Point, TextBuffer, TextEditor, Range, BufferScanResult } from "atom"
3+
import { Point, TextBuffer, TextEditor, TextEditorExt, Range, BufferScanResult } from "atom"
44
import { CancellationToken, CancellationTokenSource } from "vscode-jsonrpc"
55

66
export type ReportBusyWhile = <T>(title: string, f: () => Promise<T>) => Promise<T>
@@ -10,7 +10,7 @@ export type ReportBusyWhile = <T>(title: string, f: () => Promise<T>) => Promise
1010
* Uses the non-word characters from the position's grammar scope.
1111
*/
1212
export function getWordAtPosition(editor: TextEditor, position: Point): Range {
13-
const nonWordCharacters = escapeRegExp(editor.getNonWordCharacters(position))
13+
const nonWordCharacters = escapeRegExp((editor as TextEditorExt).getNonWordCharacters(position))
1414
const range = _getRegexpRangeAtPosition(
1515
editor.getBuffer(),
1616
position,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
},
3434
"devDependencies": {
3535
"@atom/mocha-test-runner": "^1.6.1",
36-
"@types/atom": "^1.40.7",
36+
"@types/atom": "^1.40.9",
3737
"@types/chai": "^4.2.14",
3838
"@types/mocha": "^8.2.0",
3939
"@types/node": "14.14.22",

pnpm-lock.yaml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

typings/atom/index.d.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
export {}
1+
import { Point, Notification, NotificationOptions, TextEditor } from "atom"
2+
23
declare module "atom" {
3-
interface TextEditor {
4+
interface TextEditorExt extends TextEditor {
45
getNonWordCharacters(position: Point): string
56
}
67

0 commit comments

Comments
 (0)