# babel-preset-typescript

> Babel preset for TypeScript.

Latest version **7.0.0-alpha.19** (published 2017-08-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install babel-preset-typescript
pnpm add babel-preset-typescript
yarn add babel-preset-typescript
bun add babel-preset-typescript
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: no vulnerabilities; high maintenance score; popular repo.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 7.0.0-alpha.19 |
| Published | 2017-08-07 |
| First published | 2017-08-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 43990 |
| Maintainers | hzoo |
| Keywords | babel-preset, typescript |

## Links

- npm: https://www.npmjs.com/package/babel-preset-typescript
- Repository: https://github.com/babel/babel/tree/master/packages/babel-preset-typescript
- npm.io page: https://npm.io/package/babel-preset-typescript

## Dependencies (2)

- [babel-plugin-transform-typescript](https://npm.io/package/babel-plugin-transform-typescript.md) 7.0.0-alpha.19
- [babel-plugin-syntax-object-rest-spread](https://npm.io/package/babel-plugin-syntax-object-rest-spread.md) 7.0.0-alpha.19

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

- 7.0.0-alpha.19 (latest) — 2017-08-07
- 7.0.0-beta.3 (next) — 2017-10-15
- 7.0.0-beta.2 — 2017-09-26
- 7.0.0-beta.1 — 2017-09-19
- 7.0.0-beta.0 — 2017-09-12
- 7.0.0-alpha.20 — 2017-08-30

## README

# babel-preset-typescript

> Babel preset for TypeScript.

This preset includes the following plugins:

- [transform-typescript](https://babeljs.io/docs/plugins/transform-typescript/)
- [syntax-object-rest-spread](https://babeljs.io/docs/plugins/syntax-object-rest-spread/)

## Example

**In**

```javascript
const x: number = 0;
```

**Out**

```javascript
const x = 0;
```

## Installation

```sh
npm install --save-dev babel-preset-typescript
```

## Usage

### Via `.babelrc` (Recommended)

**.babelrc**

```json
{
  "presets": ["typescript"]
}
```

### Via CLI

```sh
babel --presets typescript script.ts
```

### Via Node API

```javascript
require("babel-core").transform("code", {
  presets: ["typescript"]
});
```

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