File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -890,7 +890,9 @@ namespace ts.Completions {
890
890
}
891
891
892
892
// If the module is merged with a value, we must get the type of the class and add its propertes (for inherited static methods).
893
- if ( ! isTypeLocation && symbol . declarations . some ( d => d . kind !== SyntaxKind . SourceFile && d . kind !== SyntaxKind . ModuleDeclaration && d . kind !== SyntaxKind . EnumDeclaration ) ) {
893
+ if ( ! isTypeLocation &&
894
+ symbol . declarations &&
895
+ symbol . declarations . some ( d => d . kind !== SyntaxKind . SourceFile && d . kind !== SyntaxKind . ModuleDeclaration && d . kind !== SyntaxKind . EnumDeclaration ) ) {
894
896
addTypeProperties ( typeChecker . getTypeOfSymbolAtLocation ( symbol , node ) ) ;
895
897
}
896
898
Original file line number Diff line number Diff line change
1
+ /// <reference path='fourslash.ts'/>
2
+
3
+ ////globalThis./**/
4
+
5
+ verify . completions ( {
6
+ marker : "" ,
7
+ exact : [
8
+ { name : "globalThis" , kind : "module" } ,
9
+ ...completion . globalsVars ,
10
+ { name : "undefined" , kind : "var" }
11
+ ]
12
+ } ) ;
You can’t perform that action at this time.
0 commit comments