@astrojs/check

中文文档
0.9.12发布于 2026/10/21MITESM + CJS构建来源已验证近 30 天下载 1929.7万

Type checking and diagnostics for Astro projects

原始使用文档
文档目录4 节
  1. Documentation
  2. Support
  3. Contributing
  4. License

@astrojs/check ✅

This package powers the astro check CLI command for running type checking and diagnostics in Astro projects.

This package's internal logic is powered by the Astro language server.

Documentation

Read the Astro type checking docs.

Support

  • Get help in the Astro Discord. Post questions in our #support forum, or visit our dedicated #editors channel to discuss current development and more!

  • Submit bug reports and feature requests as GitHub issues.

Contributing

This package is maintained by Astro's Core team. You're welcome to submit an issue or PR! These links will help you get started:

License

MIT

Copyright (c) 2022–present Astro

版本与发布记录

@astrojs/check 共发布 43 个版本,首次发布于 2023/08/01;过去 12 个月发布了 10 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.9.12latest2026/10/2117 天前
0.9.112026/10/1919 天前
0.9.102026/07/273 个月前
0.9.92026/04/286 个月前
0.9.82026/03/167 个月前
0.9.72026/03/107 个月前

其他发布通道:alpha → 0.9.6-alpha.0,beta → 0.9.7-beta.1。

关于 @astrojs/check 的常见问题

@astrojs/check 是什么?

Type checking and diagnostics for Astro projects

如何安装 @astrojs/check?

在项目目录运行 npm install @astrojs/check,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:typescript(^5.0.0 || ^6.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。它还提供命令行工具 astro-check,可以用 npx astro-check 直接运行。

@astrojs/check 支持 TypeScript 吗?

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

@astrojs/check 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@astrojs/check 可以商用吗?

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

@astrojs/check 的下载量有多少?

根据 npm 官方下载统计,@astrojs/check 在 2026/10/07 – 2026/11/05 这 30 天内被下载 19,296,627 次,日均约 643,221 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@astrojs/check 还在维护吗?

最新版本 0.9.12 发布于 2026/10/21(17 天前);至今共发布 43 个版本,其中过去 12 个月发布了 10 个;首次发布于 2023/08/01。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。