# @codechecks/type-coverage-watcher 中文文档

规范地址：https://npmcn.com/package/%40codechecks/type-coverage-watcher/

版本：0\.1\.3
npm 元数据更新时间：2022-04-05T00:01:12.263Z
中文译文更新时间：2026-11-10T06:33:23.184Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40codechecks/type-coverage-watcher
原文对照：https://npmcn.com/package/%40codechecks/type-coverage-watcher/?lang=original
项目主页：https://github.com/codechecks/type-coverage-watcher#readme
源码仓库：https://github.com/codechecks/type-coverage-watcher

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：27.2 kB，25 个文件
- 模块格式：CommonJS
- TypeScript 类型：包内自带
- Node.js 要求：\>=6
- 运行依赖：2 个
- peer 依赖：@codechecks/client ^0\.1\.0
- 首次发布：2019-03-28T16:29:08.072Z
- 最新版本发布：2019-08-03T12:47:45.758Z
- 近 30 天下载量：3547（2026-10-10 至 2026-11-08，npm 官方下载统计）
- 已发布版本数：7（近 12 个月 0 个）

## 中文简介

跟踪类型覆盖 TypeScript 项目,以确保类型安全

## 安装

```sh
npm install @codechecks/type-coverage-watcher
```

也可以使用：`pnpm add @codechecks/type-coverage-watcher`、`yarn add @codechecks/type-coverage-watcher`、`bun add @codechecks/type-coverage-watcher`

## README

![codechecks.io](https://npmcn.com/package/%40codechecks/type-coverage-watcher/meta/check.png)

### 类型覆盖监视器

跟踪类型覆盖 TypeScript 项目,以确保类型安全

[![Build Status](https://circleci.com/gh/codechecks/type-coverage-watcher/tree/master.svg?style=svg)](https://circleci.com/gh/codechecks/type-coverage-watcher) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](https://npmcn.com/package.json) [![codechecks.io](https://raw.githubusercontent.com/codechecks/docs/master/images/badges/badge-default.svg?sanitize=true)](https://codechecks.io/)

## 安装

```sh
npm add --save-dev @codechecks/type-coverage-watcher
```

## 使用量

你是新来的吗? 检查出来 [获得开始的引导( 很简单)](https://github.com/codechecks/docs/blob/master/getting-started.md)来啊!

添加到您的 `codechecks.yml` 文件 :

```yml
checks:
  - name: type-coverage-watcher
  # ...
```

盖下它用 [类型覆盖](https://github.com/plantain-00/type-coverage) 软件包.

## API 密码

### 类型 Coverage 监视器( 选项: 选项): 承诺 < void >

#### 选项

```typescript
interface Options {
  tsconfigPath?: string; //defaults to tsconfig.json
  name?: string; // defaults to Type Coverage
  ignoreFiles?: string[];
  ignoreCatch?: boolean;
  atLeast?: number;
  strict?: boolean;
}
```

##### tsconfigPath 图像

选项 `string`  
  
默认 : `tsconfig.json`  
  
键入程序配置路径

##### 名称

选项 `string`  
  
默认 : `Type Coverage`  
  
指定检查的名称。 也许对单簧管有用.

##### 忽略文件夹

选项 `string[]`  
  
默认 : `undefined`  
  
指定检查文件被忽略的位置.

##### 忽略批次

选项 `string`  
  
默认 : `undefined`  
  
见 [类型覆盖描述](https://github.com/plantain-00/type-coverage#ignore-catch) 参考文献.

##### 起码

选项 `number`  
  
默认 : `undefined`  
  
示例 `atLeast: 99`  
  
如果覆盖率 < 此值 > 失败 .

##### 严格

选项 `string`  
  
默认 : `undefined`  
  
见 [类型覆盖描述](https://github.com/plantain-00/type-coverage#strict-mode) 参考文献.

## 捐款

欢迎所有捐款。 更多信息,请访问 [捐款额](https://npmcn.com/package/%40codechecks/type-coverage-watcher/CONTRIBUTING.md)

## 许可证

麻省理工学院 @ [代码检查.io](https://codechecks.io/)

## 常见问题

### @codechecks/type-coverage-watcher 是什么？

跟踪类型覆盖 TypeScript 项目,以确保类型安全

### 如何安装 @codechecks/type-coverage-watcher？

在项目目录运行 npm install @codechecks/type-coverage-watcher，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：@codechecks/client（^0\.1\.0）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。

### @codechecks/type-coverage-watcher 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @codechecks/type-coverage-watcher 支持 ESM 还是 CommonJS？

以 CommonJS 形式发布，可以直接 require\(\)；在 ES Module 项目中也可以用 import 引入（Node\.js 会把 module\.exports 作为默认导出）。

### @codechecks/type-coverage-watcher 需要什么版本的 Node\.js？

package\.json 的 engines 字段要求 Node\.js \>=6。版本不符时 npm 默认只给出警告，开启 engine-strict 后会拒绝安装。

### @codechecks/type-coverage-watcher 可以商用吗？

@codechecks/type-coverage-watcher 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @codechecks/type-coverage-watcher 的下载量有多少？

根据 npm 官方下载统计，@codechecks/type-coverage-watcher 在 2026/10/10 – 2026/11/08 这 30 天内被下载 3,547 次，日均约 118 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @codechecks/type-coverage-watcher 还在维护吗？

最新版本 0\.1\.3 发布于 2019/08/03（7 年前）；至今共发布 7 个版本，其中过去 12 个月发布了 0 个；首次发布于 2019/03/29。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

