File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 2
2
"name" : " vscode-typescript-dev" ,
3
3
"displayName" : " TSC Dev" ,
4
4
"description" : " An extension for working in the TypeScript codebase" ,
5
- "version" : " 0.0.4 " ,
5
+ "version" : " 0.0.5 " ,
6
6
"repository" : {
7
7
"type" : " git" ,
8
8
"url" : " https://github.com/orta/vscode-typescript-dev"
Original file line number Diff line number Diff line change @@ -13,21 +13,21 @@ export const twoslashCompetions: vscode.CompletionItemProvider = {
13
13
const thisLine = document . getText ( range )
14
14
// Not a comment
15
15
if ( ! thisLine . startsWith ( "//" ) ) {
16
- return { items : [ ] }
16
+ return
17
17
}
18
18
19
19
const words = thisLine . replace ( "\t" , "" ) . split ( " " )
20
20
21
21
// Not the right amount of
22
22
if ( words . length !== 2 ) {
23
- return { items : [ ] }
23
+ return
24
24
}
25
25
26
26
const word = words [ 1 ]
27
27
28
28
// Not a @ at the first word
29
29
if ( ! word . startsWith ( "@" ) ) {
30
- return { items : [ ] }
30
+ return
31
31
}
32
32
33
33
const workspace = vscode . workspace . getWorkspaceFolder ( vscode . window . activeTextEditor ! . document . uri )
@@ -40,7 +40,7 @@ export const twoslashCompetions: vscode.CompletionItemProvider = {
40
40
`TSC Dev Ext: Could not find a copy of TypeScript at ${ workspaceRoot + "/node_modules/typescript" } `
41
41
)
42
42
console . error ( "Could not find local copy of TS" )
43
- return { items : [ ] }
43
+ return
44
44
}
45
45
46
46
// @ts -ignore - ts.optionDeclarations is private
@@ -59,8 +59,9 @@ export const twoslashCompetions: vscode.CompletionItemProvider = {
59
59
}
60
60
} )
61
61
62
- return {
63
- items : results ,
64
- }
62
+ if ( results . length )
63
+ return {
64
+ items : results ,
65
+ }
65
66
} ,
66
67
}
You can’t perform that action at this time.
0 commit comments