首页 > 解决方案 > VSCode typescript intellisense 不建议嵌套命名空间中的接口

问题描述

我有一个两级嵌套命名空间,在全局范围内有一堆接口。

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

例如,我编写了一些带有A.B.I1接口实现的 C 类。

class C implements A.B.I1 {}

Ts 编译器正确实现它,但是在键入时A.B ...没有接口的建议,在 namespace 中声明B

在其他 IDE 中检查:建议出现在 WebStorm 而不是 Visual Studio 2019 中。

VSCode 1.43

TS 3.8.0

没有发现任何有此类问题的东西。

不胜感激,如果有人给建议..

谢谢。

标签: typescriptvisual-studio-codenestednamespacesintellisense

解决方案


推荐阅读