File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -167,7 +167,6 @@ TestDoubleUnderscoreCompletions
167
167
TestEditJsdocType
168
168
TestExportDefaultClass
169
169
TestExportDefaultFunction
170
- TestExportEqualNamespaceClassESModuleInterop
171
170
TestFindAllReferencesDynamicImport1
172
171
TestFindAllReferencesTripleSlash
173
172
TestFindAllReferencesUmdModuleAsGlobalConst
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import (
10
10
11
11
func TestExportEqualNamespaceClassESModuleInterop (t * testing.T ) {
12
12
t .Parallel ()
13
- t . Skip ()
13
+
14
14
defer testutil .RecoverAndFail (t , "Panic on fourslash test" )
15
15
const content = `// @esModuleInterop: true
16
16
// @moduleResolution: node
Original file line number Diff line number Diff line change @@ -859,13 +859,14 @@ func tryUseExistingNamespaceImport(existingImports []*FixAddToExistingImportInfo
859
859
declaration := existingImport .declaration
860
860
switch declaration .Kind {
861
861
case ast .KindVariableDeclaration , ast .KindImportEqualsDeclaration :
862
- if declaration .Kind == ast .KindVariableDeclaration && declaration .Name ().Kind != ast .KindIdentifier {
862
+ name := declaration .Name ()
863
+ if declaration .Kind == ast .KindVariableDeclaration && (name == nil || name .Kind != ast .KindIdentifier ) {
863
864
continue
864
865
}
865
- namespacePrefix = declaration . Name () .Text ()
866
+ namespacePrefix = name .Text ()
866
867
case ast .KindJSDocImportTag , ast .KindImportDeclaration :
867
868
importClause := ast .GetImportClauseOfDeclaration (declaration )
868
- if importClause == nil || importClause .NamedBindings .Kind != ast .KindNamespaceImport {
869
+ if importClause == nil || importClause .NamedBindings == nil || importClause . NamedBindings .Kind != ast .KindNamespaceImport {
869
870
continue
870
871
}
871
872
namespacePrefix = importClause .NamedBindings .Name ().Text ()
You can’t perform that action at this time.
0 commit comments