---
url: /docs/guide/usage/linter/rules/typescript/no-unnecessary-qualifier.md
---

### 它的作用

当引用的名称已经在作用域内时，禁止使用命名空间限定符。

### 为什么这很糟糕？

多余的限定符会增加噪音，并使类型引用更难阅读。

### 示例

以下是此规则的**不正确**代码示例：

```ts
namespace A {
  export type B = number;
  const value: A.B = 1;
}
```

以下是此规则的**正确**代码示例：

```ts
namespace A {
  export type B = number;
  const value: B = 1;
}
```

## 如何使用

## 版本

该规则于 v1.49.0 中添加。

## 参考资料
