@0xsquid/squid-types

中文文档
0.1.250发布于 2026/11/04Apache-2.0TypeScriptCommonJS近 30 天下载 1.1万

JS and TS types relating to 0xsquid related projects.

原始使用文档
文档目录3 节
  1. LINTER & PRETTIER
  2. VSCODE SETUP
  3. RELEASE

Squid Types

Squid types used on the data feed, pathfinder api and sdk.

LINTER & PRETTIER

This project has Prettier and ESLint linter rules installed. With Husky we ensure pre-commit and pre-push validation.

yarn lint
yarn lint:fix
yarn format

VSCODE SETUP

Create a file .vscode/settings.json for auto-saving linter and prettier formatting.

Add the following:

{
  "editor.formatOnSave": true,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  }
}

RELEASE

NPM package publishing is automated with github actions. Follow these steps:

1. Create a PR to the develop branch

  • Update version inside package.json
  • Review, approve and merge.

2. Create a PR from develop to main

  • Review, approve and merge

As the PR from (2.) is merged, the commit to main will automatically trigger a release to NPM, please make sure you correctly update the version.

版本与发布记录

@0xsquid/squid-types 共发布 262 个版本,首次发布于 2023/05/31;过去 12 个月发布了 59 个版本。

版本发布日期距今
0.1.250latest2026/11/042 天前
0.1.2492026/10/297 天前
0.1.2482026/10/1621 天前
0.1.2472026/10/1422 天前
0.1.2462026/10/011 个月前
0.1.2452026/09/251 个月前

其他发布通道:beta → 0.1.143-beta.3。

关于 @0xsquid/squid-types 的常见问题

@0xsquid/squid-types 是什么?

JS and TS types relating to 0xsquid related projects.

如何安装 @0xsquid/squid-types?

在项目目录运行 npm install @0xsquid/squid-types,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:typescript(^5.3.3)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@0xsquid/squid-types 支持 TypeScript 吗?

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

@0xsquid/squid-types 支持 ESM 还是 CommonJS?

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

@0xsquid/squid-types 可以商用吗?

@0xsquid/squid-types 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@0xsquid/squid-types 的下载量有多少?

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

@0xsquid/squid-types 还在维护吗?

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