# @octokit/types

> Shared TypeScript definitions for Octokit projects

Latest version **18.0.0** (published 2026-08-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install @octokit/types
pnpm add @octokit/types
yarn add @octokit/types
bun add @octokit/types
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 18.0.0 |
| Published | 2026-08-29 |
| First published | 2019-10-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 316.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 152 |
| Author | Gregor Martynus |
| Maintainers | octokitbot, gr2m, wolfy1339 |
| Keywords | github, api, sdk, toolkit, typescript |

## Links

- npm: https://www.npmjs.com/package/@octokit/types
- Repository: https://github.com/octokit/types.ts
- Homepage: https://github.com/octokit/types.ts#readme
- Issues: https://github.com/octokit/types.ts/issues
- npm.io page: https://npm.io/package/@octokit/types

## Dependencies (1)

- [@octokit/openapi-types](https://npm.io/package/@octokit/openapi-types.md) ^29.0.1

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 18.0.0 (latest) — 2026-08-29
- 10.1.0-beta.1 (beta) — 2023-06-30
- 8.2.1 (release-8.x) — 2023-01-20
- 17.0.0 — 2026-08-01
- 16.0.0 — 2025-10-30
- 15.0.2 — 2025-10-29
- 15.0.1 — 2025-10-20
- 15.0.0 — 2025-09-16
- 14.1.0 — 2025-05-25
- 14.0.0 — 2025-04-10
- 13.10.0 — 2025-03-18
- 13.9.0 — 2025-03-18
- 13.8.1 — 2025-03-18
- 13.8.0 — 2025-01-31
- 13.7.0 — 2025-01-08
- … 211 more at https://npm.io/package/@octokit/types/versions

## README

# types.ts

> Shared TypeScript definitions for Octokit projects

[![@latest](https://img.shields.io/npm/v/@octokit/types.svg)](https://www.npmjs.com/package/@octokit/types)
[![Build Status](https://github.com/octokit/types.ts/workflows/Test/badge.svg)](https://github.com/octokit/types.ts/actions?workflow=Test)

<!-- toc -->

- [Usage](#usage)
- [Examples](#examples)
  - [Get parameter and response data types for a REST API endpoint](#get-parameter-and-response-data-types-for-a-rest-api-endpoint)
  - [Get response types from endpoint methods](#get-response-types-from-endpoint-methods)
- [Contributing](#contributing)
- [License](#license)

<!-- tocstop -->

## Usage

See all exported types at https://octokit.github.io/types.ts

## Examples

### Get parameter and response data types for a REST API endpoint

```ts
import { Endpoints } from "@octokit/types";

type listUserReposParameters =
  Endpoints["GET /repos/{owner}/{repo}"]["parameters"];
type listUserReposResponse = Endpoints["GET /repos/{owner}/{repo}"]["response"];

async function listRepos(
  options: listUserReposParameters,
): listUserReposResponse["data"] {
  // ...
}
```

### Get response types from endpoint methods

```ts
import {
  GetResponseTypeFromEndpointMethod,
  GetResponseDataTypeFromEndpointMethod,
} from "@octokit/types";
import { Octokit } from "@octokit/rest";

const octokit = new Octokit();
type CreateLabelResponseType = GetResponseTypeFromEndpointMethod<
  typeof octokit.issues.createLabel
>;
type CreateLabelResponseDataType = GetResponseDataTypeFromEndpointMethod<
  typeof octokit.issues.createLabel
>;
```

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md)

## License

[MIT](LICENSE)

---
_Source: https://npm.io/package/@octokit/types · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
