Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why doesn't VS Code TypeScript IntelliSense suggest interfaces from nested namespaces for implementing?

I have a two-level nested namespaces with bunch of interfaces in global scope.

declare global {
  namespace A {
    namespace B {
      interface I1 {
      }
      interface I2 {
      }
    }
  }
}

I write, for example, some class C with A.B.I1 interface implementation.

class C implements A.B.I1 {}

TS compiler implements it properly, but when typing A.B ... there is no suggestions of interfaces, declared in namespace B.

I checked in other IDEs: suggestions appear in WebStorm and not in Visual Studio 2019.

VS Code 1.43

TS 3.8.0

I didn't find anything with such issue.

like image 963
kodmigor Avatar asked Sep 09 '26 19:09

kodmigor


1 Answers

This behaviour got added in TypeScript v4.1 (I don't know exactly which commit / issue ticket though).

  • 4.0 Playground Link

  • 4.1 Playground Link

  • Release Notes link

  • GitHub Release link

like image 119
starball Avatar answered Sep 11 '26 11:09

starball