@thetimes/times-public-api-types

中文文档
1.0.13733发布于 2026/11/03ISCTypeScript

This module contains the TypeScript definitions for the Times Public API's GraphQL types. The names of the types match the names in the GraphQL API.

原始使用文档

@thetimes/times-public-api-types

This module contains the TypeScript definitions for the Times Public API's GraphQL types. The names of the types match the names in the GraphQL API.

Usage

import { Article } from "@thetimes/times-public-api-types";

interface TPAClient {
  getArticle(articleId: string): Promise<Article>;
}

Known issues

You may need to import at least 1 type manually from this package to your project before the auto-import suggestions start working.

版本与发布记录

@thetimes/times-public-api-types 共发布 818 个版本,首次发布于 2019/01/09;过去 12 个月发布了 109 个版本。

版本发布日期距今
1.0.13733latest2026/11/03今天
1.0.136872026/10/285 天前
1.0.136832026/10/286 天前
1.0.136702026/10/277 天前
1.0.136682026/10/268 天前
1.0.136622026/10/268 天前

关于 @thetimes/times-public-api-types 的常见问题

@thetimes/times-public-api-types 是什么?

这个模块包含了Times Public API的GraphQL类型的TypeScript定义。类型的名称与GraphQL API中的名称匹配。

如何安装 @thetimes/times-public-api-types?

在项目目录运行 npm install @thetimes/times-public-api-types,或使用 pnpm add / yarn add / bun add。

@thetimes/times-public-api-types 支持 TypeScript 吗?

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

@thetimes/times-public-api-types 可以商用吗?

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

@thetimes/times-public-api-types 还在维护吗?

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