# tsi

> A typescript REPL (command line interpreter)

Latest version **0.3.0** (published 2013-08-12) · MIT license · 0 weekly downloads

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

## Install

```sh
npm install tsi
pnpm add tsi
yarn add tsi
bun add tsi
```

Provides the command `tsi`.

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2013-08-12 |
| First published | 2013-08-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 34 |
| Author | Bryan Head |
| Maintainers | qiemem |
| Keywords | typescript, repl, command line, interpreter |

## Links

- npm: https://www.npmjs.com/package/tsi
- Repository: https://github.com/qiemem/tsi
- Issues: https://github.com/qiemem/tsi/issues
- npm.io page: https://npm.io/package/tsi

## Dependencies (2)

- [optimist](https://npm.io/package/optimist.md) ~0.6.0
- [typescript.api](https://npm.io/package/typescript.api.md) ~0.7.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.3.0 (latest) — 2013-08-12
- 0.2.0 — 2013-08-04
- 0.1.3 — 2013-08-04
- 0.1.0 — 2013-08-03

## README

tsi
---

    A simple typescript REPL.
    Usage: tsi

    Options:
      -h, --help     Print this help message                           
      -f, --force    Force tsi to evaluate code with typescript errors.
      -v, --verbose  Print compiled javascript before evaluating.      

### Installation

tsi runs on node.js and can easily be installed through npm.

    npm install -g tsi

### Building

The `bin` directory includes the current build of tsi. If you would like to
rebuild it though, just run

    npm run-script build

### Example

    $ tsi
    > var square = (x: number) => x * x;
    undefined
    > square(5);
    25
    > square('foo');
    error TS2081: Supplied parameters do not match any signature of call target.
    error TS2087: Could not select overload for 'call' expression.

### Caveats

You can't change the type of variable after it's been declared:

    $ tsi
    > var x = 5;
    undefined
    > x = 'hi';
    error TS2011: Cannot convert 'string' to 'number'.

You can't redeclare variables (in particular, to get around the previous caveat):

    $ tsi
    > var x = 1;
    undefined
    > var x = 'hi';
    error TS2000: Duplicate identifier 'x'.

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