# ts-api-utils

> Utility functions for working with TypeScript's API. Successor to the wonderful tsutils. 🛠️️

Latest version **2.5.0** (published 2026-03-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install ts-api-utils
pnpm add ts-api-utils
yarn add ts-api-utils
bun add ts-api-utils
```

## Health

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

Positive: has types; esm support; no vulnerabilities; has provenance; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.5.0 |
| Published | 2026-03-19 |
| First published | 2023-02-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18.12 |
| Dependencies | 0 |
| Unpacked size | 344.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 122 |
| Author | JoshuaKGoldberg |
| Maintainers | joshuakgoldberg |

## Links

- npm: https://www.npmjs.com/package/ts-api-utils
- Repository: https://github.com/JoshuaKGoldberg/ts-api-utils
- Homepage: https://github.com/JoshuaKGoldberg/ts-api-utils#readme
- Issues: https://github.com/JoshuaKGoldberg/ts-api-utils/issues
- npm.io page: https://npm.io/package/ts-api-utils

## Recent versions

- 2.5.0 (latest) — 2026-03-19
- 3.0.0-rc.1 (rc) — 2026-03-21
- 1.0.0-beta (beta) — 2023-06-15
- 2.4.0 — 2026-01-02
- 2.3.0 — 2025-12-28
- 2.2.0 — 2025-12-27
- 2.1.1 — 2025-12-27
- 2.1.0 — 2025-03-20
- 2.0.1 — 2025-02-01
- 2.0.0 — 2024-12-01
- 1.4.3 — 2024-11-29
- 1.4.2 — 2024-11-26
- 1.4.1 — 2024-11-24
- 1.4.0 — 2024-10-30
- 1.3.0 — 2024-03-09
- … 37 more at https://npm.io/package/ts-api-utils/versions

## README

<h1 align="center">TypeScript API Utils</h1>

<p align="center">
  Utility functions for working with TypeScript's API.
  Successor to the wonderful tsutils.
  🛠️️
</p>

<p align="center">
	<a href="https://github.com/JoshuaKGoldberg/ts-api-utils/blob/main/.github/CODE_OF_CONDUCT.md" target="_blank"><img alt="🤝 Code of Conduct: Kept" src="https://img.shields.io/badge/%F0%9F%A4%9D_code_of_conduct-kept-21bb42" /></a>
	<a href="https://codecov.io/gh/JoshuaKGoldberg/ts-api-utils" target="_blank"><img alt="🧪 Coverage" src="https://img.shields.io/codecov/c/github/JoshuaKGoldberg/ts-api-utils?label=%F0%9F%A7%AA%20coverage" /></a>
  <a href="#" target="_blank"><img alt="📚 Documentation Coverage" src="https://raw.githubusercontent.com/JoshuaKGoldberg/ts-api-utils/refs/heads/main/docs/coverage.svg" /></a>
	<a href="https://github.com/JoshuaKGoldberg/ts-api-utils/blob/main/LICENSE.md" target="_blank"><img alt="📝 License: MIT" src="https://img.shields.io/badge/%F0%9F%93%9D_license-MIT-21bb42.svg"></a>
	<a href="http://npmjs.com/package/ts-api-utils"><img alt="📦 npm version" src="https://img.shields.io/npm/v/ts-api-utils?color=21bb42&label=%F0%9F%93%A6%20npm" /></a>
	<img alt="💪 TypeScript: Strict" src="https://img.shields.io/badge/%F0%9F%92%AA_typescript-strict-21bb42.svg" />
</p>

## Usage

```shell
npm i ts-api-utils
```

```ts
import * as tsutils from "ts-api-utils";

tsutils.forEachToken(/* ... */);
```

### API

`ts-api-utils` provides many utility functions.
Check out our API docs for details:

📝 [ts-api-utils API docs](https://joshuakgoldberg.github.io/ts-api-utils).

## Development

See [`.github/CONTRIBUTING.md`](./.github/CONTRIBUTING.md).
Thanks! 💖

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