# @chialab/swc-types

> A babel/types-like set of helpers for swc.

Latest version **0.12.2** (published 2021-10-01) · MIT license · 0 weekly downloads

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

## Install

```sh
npm install @chialab/swc-types
pnpm add @chialab/swc-types
yarn add @chialab/swc-types
bun add @chialab/swc-types
```

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.12.2 |
| Published | 2021-10-01 |
| First published | 2021-04-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=13 |
| Dependencies | 1 |
| Unpacked size | 21.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 183 |
| Author | Chialab |
| Maintainers | chialab-admin, chialab-developers |
| Keywords | ast, swc, babel, es5 |

## Links

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

## Dependencies (1)

- [@swc/core](https://npm.io/package/@swc/core.md) ^1.2.54

## 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.12.2 (latest) — 2021-10-01
- 0.12.0 — 2021-09-27
- 0.11.13 — 2021-08-07
- 0.11.8 — 2021-08-06
- 0.11.0 — 2021-08-04
- 0.10.0 — 2021-07-27
- 0.9.12 — 2021-07-22
- 0.9.10 — 2021-07-22
- 0.9.0 — 2021-07-13
- 0.8.13 — 2021-06-30
- 0.8.0 — 2021-05-25
- 0.7.0 — 2021-05-17
- 0.6.0 — 2021-05-13
- 0.5.8 — 2021-05-10
- 0.5.0 — 2021-05-03
- … 6 more at https://npm.io/package/@chialab/swc-types/versions

## README

<p align="center">
    <strong>SWC Types</strong> • A babel/types-like set of helpers for <a href="https://swc.rs/">swc</a>.
</p>

<p align="center">
    <a href="https://www.npmjs.com/package/@chialab/swc-types"><img alt="NPM" src="https://img.shields.io/npm/v/@chialab/swc-types.svg?style=flat-square"></a>
</p>

> ⚠️ The development of this plugin has been suspended for maintenance reasons after an initial trial period. Developments will follow when the swc project will be more stable.

---


## Install

```sh
$ npm i @chialab/swc-types -D
$ yarn add @chialab/swc-types -D
```

## Usage

```js
import { t, Visitor } from '@chialab/swc-types';

export class ConsoleVisitor extends Visitor {
    visitCallExpression(e: CallExpression): Expression {
        if (!t.isMemberExpression(e.callee)) {
            return e;
        }

        if (t.isIdentifier(e.callee.object) && e.callee.object.value === 'console') {
            if (t.isIdentifier(e.callee.property)) {
                return t.unaryExpression('void', t.numericLiteral(0));
            }
        }

        return e;
    }
}
```

---

## License

**SWC Types** is released under the [MIT](https://github.com/chialab/rna/blob/main/packages/swc-types/LICENSE) license.

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