@azure-rest/core-client

中文文档
2.9.0发布于 2026/09/04MITTypeScriptESM + CJS近 30 天下载 4300.3万

Core library for interfacing with Azure Rest Clients

原始使用文档
文档目录9 节
  1. Getting started
  2. Requirements
  3. Currently supported environments
  4. Installation
  5. Key concepts
  6. Examples
  7. Next steps
  8. Troubleshooting
  9. Contributing

Azure Rest Core client library for JavaScript

This library is primarily intended to be used in code generated by the TypeSpec @azure-tools/typespec-ts emitter, specifically for REST-level clients.

Getting started

Requirements

Currently supported environments

See our support policy for more details.

Installation

This package is primarily used in generated code and not meant to be consumed directly by end users.

Key concepts

Examples

Examples can be found in the samples folder.

Next steps

You can build and run the tests locally by executing npm run test. Explore the test folder to see advanced usage and behavior of the public classes.

Learn more about the TypeSpec @azure-tools/typespec-ts emitter for generating a compatible client on top of this package.

Troubleshooting

If you run into issues while using this library, please feel free to file an issue.

Contributing

If you'd like to contribute to this library, please read the contributing guide to learn more about how to build and test the code.

版本与发布记录

@azure-rest/core-client 共发布 435 个版本,首次发布于 2021/04/21;过去 12 个月发布了 34 个版本。

版本发布日期距今
2.9.0latest2026/09/042 个月前
2.8.02026/07/143 个月前
2.7.02026/06/234 个月前
2.6.12026/06/055 个月前
2.6.02026/04/096 个月前
2.5.2-alpha.20260311.2dev2026/03/127 个月前

关于 @azure-rest/core-client 的常见问题

@azure-rest/core-client 是什么?

Core library for interfacing with Azure Rest Clients

如何安装 @azure-rest/core-client?

在项目目录运行 npm install @azure-rest/core-client,或使用 pnpm add / yarn add / bun add。

@azure-rest/core-client 支持 TypeScript 吗?

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

@azure-rest/core-client 支持 ESM 还是 CommonJS?

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

@azure-rest/core-client 需要什么版本的 Node.js?

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

@azure-rest/core-client 可以商用吗?

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

@azure-rest/core-client 的下载量有多少?

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

@azure-rest/core-client 还在维护吗?

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