Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

Commit 68bd969

Browse files
authored
Add type annotations in complete.ts
1 parent d248838 commit 68bd969

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/complete.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export function localCompletionSource(context: CompletionContext): CompletionRes
9191
}
9292

9393
function pathFor(read: (node: SyntaxNode) => string, member: SyntaxNode, name: string) {
94-
let path = []
94+
let path: string[] = []
9595
for (;;) {
9696
let obj = member.firstChild, prop
9797
if (obj?.name == "VariableName") {
@@ -133,7 +133,7 @@ export function completionPath(context: CompletionContext): {path: readonly stri
133133
}
134134

135135
function enumeratePropertyCompletions(obj: any, top: boolean): readonly Completion[] {
136-
let options = [], seen: Set<string> = new Set
136+
let options: Completion[] = [], seen: Set<string> = new Set
137137
for (let depth = 0;; depth++) {
138138
for (let name of (Object.getOwnPropertyNames || Object.keys)(obj)) {
139139
if (!/^[a-zA-Z_$\xaa-\uffdc][\w$\xaa-\uffdc]*$/.test(name) || seen.has(name)) continue

0 commit comments

Comments
 (0)