@@ -4,9 +4,9 @@ import { get as weaveGet, moveNext as weaveMoveNext, movePrev as weaveMovePrev }
4
4
5
5
import { getLine } from "./blocks.js"
6
6
7
- import { Point } from "atom"
7
+ import { Point , TextEditor } from "atom"
8
8
9
- export function getRange ( editor ) {
9
+ export function getRange ( editor : TextEditor ) {
10
10
// Cell range is:
11
11
// Start of line below top delimiter (and/or start of top row of file) to
12
12
// End of line before end delimiter
@@ -48,15 +48,15 @@ export function getRange(editor) {
48
48
return [ start , end ]
49
49
}
50
50
51
- export function get ( editor ) {
51
+ export function get ( editor : TextEditor ) {
52
52
if ( editor . getGrammar ( ) . scopeName . indexOf ( "source.julia" ) > - 1 ) {
53
53
return jlGet ( editor )
54
54
} else {
55
55
return weaveGet ( editor )
56
56
}
57
57
}
58
58
59
- function jlGet ( editor ) {
59
+ function jlGet ( editor : TextEditor ) {
60
60
const range = getRange ( editor )
61
61
let text = editor . getTextInBufferRange ( range )
62
62
if ( text . trim ( ) === "" ) text = " "
@@ -72,7 +72,7 @@ function jlGet(editor) {
72
72
return [ res ]
73
73
}
74
74
75
- export function moveNext ( editor ) {
75
+ export function moveNext ( editor : TextEditor ) {
76
76
if ( editor == null ) {
77
77
editor = atom . workspace . getActiveTextEditor ( )
78
78
}
@@ -83,7 +83,7 @@ export function moveNext(editor) {
83
83
}
84
84
}
85
85
86
- function jlMoveNext ( editor ) {
86
+ function jlMoveNext ( editor : TextEditor ) {
87
87
const range = getRange ( editor )
88
88
const sel = editor . getSelections ( ) [ 0 ]
89
89
const nextRow = range [ 1 ] . row + 2 // 2 = 1 to get to delimiter line + 1 more to go past it
@@ -93,7 +93,7 @@ function jlMoveNext(editor) {
93
93
] )
94
94
}
95
95
96
- export function movePrev ( editor ) {
96
+ export function movePrev ( editor : TextEditor ) {
97
97
if ( editor == null ) {
98
98
editor = atom . workspace . getActiveTextEditor ( )
99
99
}
@@ -104,7 +104,7 @@ export function movePrev(editor) {
104
104
}
105
105
}
106
106
107
- function jlMovePrev ( editor ) {
107
+ function jlMovePrev ( editor : TextEditor ) {
108
108
const range = getRange ( editor )
109
109
const prevRow = range [ 0 ] . row - 2 // 2 = 1 to get to delimiter line + 1 more to go past it
110
110
const sel = editor . getSelections ( ) [ 0 ]
0 commit comments