# ts-api-guardian

> Guards the API of TypeScript libraries!

Latest version **0.6.0** (published 2021-01-21) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

Provides the command `ts-api-guardian`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.6.0 |
| Published | 2021-01-21 |
| First published | 2016-01-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 111.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 101038 |
| Maintainers | angular |
| Keywords | typescript |

## Links

- npm: https://www.npmjs.com/package/ts-api-guardian
- Repository: https://github.com/angular/angular
- Homepage: https://github.com/angular/angular/tools/ts-api-guardian
- Issues: https://github.com/angular/angular/issues
- npm.io page: https://npm.io/package/ts-api-guardian

## Dependencies (3)

- [diff](https://npm.io/package/diff.md) ^3.5.0
- [chalk](https://npm.io/package/chalk.md) ^2.3.1
- [minimist](https://npm.io/package/minimist.md) ^1.2.0

## 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

- 0.6.0 (latest) — 2021-01-21
- 0.1.1 (next) — 2016-06-20
- 0.5.0 — 2020-01-23
- 0.4.6 — 2019-06-18
- 0.4.5 — 2019-06-17
- 0.4.4 — 2019-04-26
- 0.4.3 — 2019-04-25
- 0.4.2 — 2019-04-22
- 0.4.1 — 2018-10-01
- 0.4.0 — 2018-10-01
- 0.3.0 — 2018-02-27
- 0.2.2 — 2017-06-22
- 0.2.1 — 2017-02-10
- 0.2.0 — 2017-02-03
- 0.1.4 — 2016-06-27
- … 7 more at https://npm.io/package/ts-api-guardian/versions

## README

# Typescript API Guardian

Keeps track of public API surface of a typescript library.

Examples:

```sh
# Generate one declaration file
ts-api-guardian --out api_guard.d.ts index.d.ts
# Generate multiple declaration files
# (output location like typescript)
ts-api-guardian --outDir api_guard [--rootDir .] core/index.d.ts core/testing.d.ts
# Print usage
ts-api-guardian --help
# Check against one declaration file
ts-api-guardian --verify api_guard.d.ts index.d.ts
# Check against multiple declaration files
ts-api-guardian --verifyDir api_guard [--rootDir .] core/index.d.ts core/testing.d.ts
```

# For developers

Build and test this library:

```sh
$ yarn bazel run //:install
$ yarn bazel test //tools/ts-api-guardian:all
```

Publish to NPM:

```sh
$ yarn bazel run @nodejs//:npm whoami # should be logged in as angular
$ grep version tools/ts-api-guardian/package.json # advance as needed
$ yarn bazel run //tools/ts-api-guardian:ts-api-guardian.publish
```

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