@chargebee/chargebee-js-types

中文文档
1.0.8发布于 2025/08/14MITTypeScript零依赖近 30 天下载 19.5万

TypeScript Definitions for Chargebee.js

原始使用文档
文档目录5 节
  1. Install
  2. Setup Pre-commit Hooks
  3. Add Typing to window.Chargebee
  4. Excluding type check on node_modules
  5. Support

Chargebee.js Types

This package contains type definitions for Chargebee JS browser SDK. If your are looking for Chargebee.js components head to framework wrappers.

Install

npm install --save-dev @chargebee/chargebee-js-types

Setup Pre-commit Hooks

Install pre-commit framework in developer machine

brew install pre-commit
npm run precommit

Add Typing to window.Chargebee

To have the Chargebee object properly typed, add the following global type definition, such as in global.d.ts:

import Chargebee from "@chargebee/chargebee-js-types"

declare global {
    var Chargebee: Chargebee
}

Excluding type check on node_modules

To avoid type check errors from libraries ensure to add following to tsconfig.json

{
  "compilerOptions": {
    "skipLibCheck": true
  }
}

Support

Have any queries regarding the implementation? Reach out to [email protected]

版本与发布记录

@chargebee/chargebee-js-types 共发布 15 个版本,首次发布于 2022/12/09;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.0.8latest2025/08/141.2 年前
1.0.72025/08/051.3 年前
1.0.62025/07/111.3 年前
1.0.42025/06/161.4 年前
1.0.32025/05/211.5 年前
1.0.2-beta.52025/05/061.5 年前

关于 @chargebee/chargebee-js-types 的常见问题

@chargebee/chargebee-js-types 是什么?

TypeScript Definitions for Chargebee.js

如何安装 @chargebee/chargebee-js-types?

在项目目录运行 npm install @chargebee/chargebee-js-types,或使用 pnpm add / yarn add / bun add。

@chargebee/chargebee-js-types 支持 TypeScript 吗?

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

@chargebee/chargebee-js-types 可以商用吗?

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

@chargebee/chargebee-js-types 的下载量有多少?

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

@chargebee/chargebee-js-types 还在维护吗?

最新版本 1.0.8 发布于 2025/08/14(1.2 年前);至今共发布 15 个版本,其中过去 12 个月发布了 0 个;首次发布于 2022/12/09。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。