# steve8708-typescript-register

> Extension to require TypeScript files from Node

Latest version **1.1.5** (published 2015-10-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install steve8708-typescript-register
pnpm add steve8708-typescript-register
yarn add steve8708-typescript-register
bun add steve8708-typescript-register
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.5 |
| Published | 2015-10-04 |
| First published | 2015-08-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| Author | Phips Peter |
| Maintainers | popsugar |
| Keywords | typescript, require, interpret |

## Links

- npm: https://www.npmjs.com/package/steve8708-typescript-register
- Repository: https://github.com/pspeter3/typescript-register
- Issues: https://github.com/pspeter3/typescript-register/issues
- npm.io page: https://npm.io/package/steve8708-typescript-register

## Dependencies (4)

- [chalk](https://npm.io/package/chalk.md) ^0.5.1
- [lodash](https://npm.io/package/lodash.md) ^3.10.1
- [typescript](https://npm.io/package/typescript.md) ^1.5.0-beta
- [sanitize-filename](https://npm.io/package/sanitize-filename.md) ^1.3.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

- 1.1.5 (latest) — 2015-10-04
- 1.1.4 — 2015-09-10
- 1.1.3 — 2015-09-10
- 1.1.2 — 2015-09-10
- 1.1.1 — 2015-09-10
- 1.1.0 — 2015-08-18

## README

# TypeScript Register [![NPM Version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage][coveralls-image]][coveralls-url]

Extension to require TypeScript files from Node. This project is an alternative to [typescript-require][typescript-require]. The main differences are:

- Dependencies are run in the same context as the parent
- Uses the TypeScript API as opposed to forking `tsc`
- Caches dependencies in `/tmp/typescript-register/:your/:path/:here`

## Examples

### foo.ts

```ts
export var foo = 3;
```

### bar.js
```js
require('typescript-register');
var foo = require('./foo');

console.log(foo.foo);
```

## Installation

Install with npm:

```
npm install typescript-register
```

## Configuration

There are three configuration options which are read from environment variables. The configuration options are read each time a module is required so you can programatically set them with: 

```js
process.env[':name'] = ':value';
```

The values are:

- `TYPESCRIPT_REGISTER_EMIT_ERROR`: Whether or not emit fatal TypeScript errors
- `TYPESCRIPT_REGISTER_USE_CACHE`: Whether or not to use previously emitted files
- `TYPESCRIPT_REGISTER_COMPILER_OPTIONS`: The JSON stringified TypeScript compiler options

## Contributing

Feel free to fork and submit pull requests for the code! Please follow the existing code as an example of style and make sure that all your code passes tests.

[npm-url]: https://www.npmjs.org/package/typescript-register
[npm-image]: http://img.shields.io/npm/v/typescript-register.svg?style=flat-square

[travis-url]: http://travis-ci.org/pspeter3/typescript-register
[travis-image]: http://img.shields.io/travis/pspeter3/typescript-register/master.svg?style=flat-square

[coveralls-url]: https://coveralls.io/r/pspeter3/typescript-register
[coveralls-image]: https://img.shields.io/coveralls/pspeter3/typescript-register/master.svg?style=flat-square

[typescript-require]: https://github.com/eknkc/typescript-require

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