# ts-expose-internals

> Augment the TypeScript compiler module's types to expose hidden internal types

Latest version **5.6.3** (published 2024-10-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install ts-expose-internals
pnpm add ts-expose-internals
yarn add ts-expose-internals
bun add ts-expose-internals
```

## Health

**Score 30/100 (F)** — status: maintenance-mode.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.6.3 |
| Published | 2024-10-10 |
| First published | 2020-07-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ron Spickenagel |
| Maintainers | nonara |
| Keywords | typescript, internal types, internals, byots, types |

## Links

- npm: https://www.npmjs.com/package/ts-expose-internals
- Repository: https://github.com/nonara/ts-expose-internals
- Homepage: https://github.com/nonara/ts-expose-internals#readme
- Issues: https://github.com/nonara/ts-expose-internals/issues
- npm.io page: https://npm.io/package/ts-expose-internals

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

- 5.6.3 (latest) — 2024-10-10
- 5.6.1-rc (rc) — 2024-08-24
- 5.6.0-beta (beta) — 2024-07-27
- 5.6.2 — 2024-09-10
- 5.5.4 — 2024-07-23
- 5.5.3 — 2024-07-02
- 5.5.2 — 2024-06-21
- 5.5.1-rc — 2024-06-08
- 5.4.5 — 2024-04-11
- 5.4.4 — 2024-04-05
- 5.4.3 — 2024-03-21
- 5.4.2 — 2024-03-07
- 5.4.1-rc — 2024-02-23
- 5.4.0-beta — 2024-01-30
- 5.3.3 — 2023-12-07
- … 70 more at https://npm.io/package/ts-expose-internals/versions

## README

[![License](https://img.shields.io/npm/l/ts-expose-internals)](https://opensource.org/licenses/MIT)

# TypeScript Internal Types

Expose TypeScript internal types by simply adding a development dependency.

## Setup

1. Add aliased dependency to package.json (use the same version as your typescript version)

   ```jsonc
   {
     "devDependencies": {
       "typescript": "^5.1.3",
       // Note: The package is 'ts-expose-internals', but we are aliasing within the @types scope to make TS adopt it globally
       "@types/ts-expose-internals": "npm:ts-expose-internals@5.1.3"
     }
   }
   ```

2. Run `npm install` / `yarn install`

## Usage
All internal types are now available within the primary typescript module
```ts
// This namespace is flagged @internal and is omitted from published types, but now we can access it!
import { JsDoc } from 'typescript'
```

## How It Works

The code within this repo runs on a schedule of once per day via GitHub Actions.

It checks for new TypeScript release tags, and if there are any, it clones the source code for that release and
builds the internal types. After, it performs a bit of transformation magic and publishes the package to NPM.

New types are added to the 'typescript' module via the 
[Module Augmentation](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation) technique.

## Notes

- We publish for full TS releases only. If you'd like nightly builds, have a look at [byots](https://github.com/basarat/byots).
- If we don't have a package for the latest release, please allow 24hrs, then file an issue.

## Acknowledgments

Thanks to [basarat](https://github.com/basarat) for his work on [byots](https://github.com/basarat/byots), which served
as the inspiration!

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