# @better-typescript/better-typescript 中文文档

规范地址：https://npmcn.com/package/%40better-typescript/better-typescript/

版本：0\.5\.3
npm 元数据更新时间：2026-10-16T14:03:56.941Z
中文译文更新时间：2026-11-08T00:10:49.663Z
软件包许可：MIT

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

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

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

- 包体积（解压后）：3.8 kB，4 个文件
- TypeScript 类型：未声明
- Node.js 要求：\>=18
- 运行依赖：0 个
- 首次发布：2026-08-25T14:07:12.719Z
- 最新版本发布：2026-10-16T14:03:56.723Z
- 近 30 天下载量：4946（2026-10-08 至 2026-11-06，npm 官方下载统计）
- 已发布版本数：42（近 12 个月 42 个）

## 中文简介

类型意识类型脚本插件

## 安装

```sh
npm install @better-typescript/better-typescript
```

也可以使用：`pnpm add @better-typescript/better-typescript`、`yarn add @better-typescript/better-typescript`、`bun add @better-typescript/better-typescript`

## README

# 更好的类型脚本

Type-aware TypeScript Linting 作为本土可执行文件.

```sh
npm install --save-dev @better-typescript/better-typescript
npx better-typescript
```

从包含的目录中运行命令 `tsconfig.json`违章行为被写成NDJSON以示平息.

运行 `npx better-typescript semantic` 以便改变工作树木, `semantic --files 'src/**/*.ts'` 用于选择当前文件, `semantic --all` 用于所有符合条件的当前文件,或 `semantic --range 'origin/main...HEAD'` 以一个坚定的射程发誓, 添加 `--rules function-naming,readonly` 选择政策或 `--dry-run` 检查路线。 需要活的语义用法 `TYPESAFE_API_KEY` 环境或环境环境 `.env`。 。 。 .

## 常见问题

### @better-typescript/better-typescript 是什么？

类型意识类型脚本插件

### 如何安装 @better-typescript/better-typescript？

在项目目录运行 npm install @better-typescript/better-typescript，或使用 pnpm add / yarn add / bun add。它还提供命令行工具 better-typescript，可以用 npx better-typescript 直接运行。

### @better-typescript/better-typescript 支持 TypeScript 吗？

该包的 package\.json 没有声明类型入口。需要类型提示时，可以在 npm 上查找社区维护的 @types/better-typescript\_\_better-typescript 是否存在。

### @better-typescript/better-typescript 需要什么版本的 Node\.js？

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

### @better-typescript/better-typescript 可以商用吗？

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

### @better-typescript/better-typescript 的下载量有多少？

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

### @better-typescript/better-typescript 还在维护吗？

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

