简中文档

no-implicit-declare-namespace-export

禁止在 "环境" 命名空间 中使用隐式导出。

TypeScript 隐式导出所有成员的 "环境" 命名空间,除非存在命名导出。

无效:

// foo.ts 或 foo.d.ts
declare namespace ns {
  interface ImplicitlyExported {}
  export type Exported = true;
}

有效:

// foo.ts 或 foo.d.ts
declare namespace ns {
  interface NonExported {}
  export {};
}

declare namespace ns {
  interface Exported {}
  export { Exported };
}

declare namespace ns {
  export interface Exported {}
}

你找到了你需要的东西吗?

编辑此页面
隐私政策