# ntypescript

> A nicer version of microsoft/typescript packaged and released for API developers

Latest version **1.201706190042.1** (published 2017-06-19) · MIT license · 0 weekly downloads

## Install

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

Provides the command `ntsc`.

## 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.201706190042.1 |
| Published | 2017-06-19 |
| First published | 2015-06-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 114 |
| Author | basaratali@gmail.com |
| Maintainers | basarat, blakeembrey, nycdotnet |
| Keywords | typescript, gruntplugin |

## Links

- npm: https://www.npmjs.com/package/ntypescript
- Repository: https://github.com/basarat/ntypescript
- Homepage: https://github.com/basarat/ntypescript#readme
- Issues: https://github.com/basarat/ntypescript/issues
- npm.io page: https://npm.io/package/ntypescript

## 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.201706190042.1 (latest) — 2017-06-19
- 1.201609302242.1 — 2016-09-30
- 1.201609060105.1 — 2016-09-06
- 1.201609050105.1 — 2016-09-05
- 1.201609040105.1 — 2016-09-04
- 1.201609030106.1 — 2016-09-03
- 1.201609020105.1 — 2016-09-02
- 1.201609010006.1 — 2016-09-01
- 1.201608310006.1 — 2016-08-31
- 1.201608300008.1 — 2016-08-30
- 1.201608290012.1 — 2016-08-29
- 1.201608280005.1 — 2016-08-28
- 1.201608270006.1 — 2016-08-27
- 1.201608260007.1 — 2016-08-26
- 1.201608250007.1 — 2016-08-25
- … 463 more at https://npm.io/package/ntypescript/versions

## README

# NTypeScript is dead. [Bring your own TypeScript](https://github.com/basarat/byots) 🌹

The following is left as legacy docs.

# NTypeScript

[![Downloads](http://img.shields.io/npm/dm/ntypescript.svg)](https://npmjs.org/package/ntypescript)
[![BuildStatus](https://travis-ci.org/TypeStrong/ntypescript.svg)](https://travis-ci.org/TypeStrong/ntypescript)

**Nicer** [**TypeScript**](https://github.com/Microsoft/TypeScript), **making it easier to work with the compiler API** 🌹

[![NPM](https://nodei.co/npm-dl/ntypescript.png)](https://nodei.co/npm/ntypescript/)

> Kudos to the TypeScript team for maintaining all the code that this project depends on. This project is just a minor automation on top.

Niceness list:

* Releases everyday.
* Consistent side by side usage (just add an `n` prefix): `require('ntypescript')`, `ntsc`
* `package.json` links you to typescript definitions (using `typescript.definition` entry)
* Super Nice: We expose the internal APIs (the ones that have `/* internal */`)
* Super Nice: We expose the global `ts` variable. Just `require('ntypescript')` once and start using `ts` like you are in the actual compiler source code.
* Super Nice: Converts `const enum` in the compiler definition to `enum`. This decreases the typescript compiler version dependence on your dev tools TS->JS emit.
* Easier to muck around with the compiler / language service when installed from NPM. Just open any file from `node_modules/ntypescript/src` folder in atom-typescript and press `f6` to get a new *local* rebuild.

Design incompatibilities:
* This project does not ship with `tsserver`.

## Install
Similar to `typescript` you can install and use `ntypescript` globally:

``` sh
npm install ntypescript -g
```

or in your package.json

```sh
npm install ntypescript@latest --save --save-exact
```

Each release is named after the day it was built and the git commit hash in Microsoft/TypeScript/master that it was built from. We recommend adding `save-exact` as there are no guarantees on when stuff might break and you want your users to get the same version you tested.

## Usage

### Globally
You can use `ntsc` *exactly* like the `tsc` command line tool.

### Require
Use `require('ntypescript')`

### Global `ts`
In addition to returning what `typescript` returns we also expose `ts` as a global.

```ts
declare var require: any;
require('ntypescript');
console.log(ts.createScanner);
```
Which makes it easy to use the compiler API if you are using it heavily. Note you only need to `require` *once* from any file.

### Replace TypeScript
For `require('typescript')` you can do that quite simply using your package.json:

```json
"dependencies": {
    "typescript": "https://github.com/basarat/ntypescript/tarball/<release name>"
}
```
Release name example : `1.201506301047.1+e1c9d28cb0706f81c14ca95b92fa3e2a223cc60b`

### Grunt
This project comes with a built in `grunt` task called `ntypescript`. Just has just one *task* level option:

* `project` : path to the project directory i.e. the *directory* that contains `tsconfig.json`.

Here is a sample `Gruntfile.js` for usage:

```ts
module.exports = function(grunt) {
    grunt.loadNpmTasks('ntypescript');

    grunt.initConfig({
        ntypescript: {
            options: {
                project: '.'
            }
        },
    });

    grunt.registerTask('default', ['ntypescript']);
};
```

### NPM Scripts
Init and setup in `package.json`
```bash
npm init
npm install ntypescript@latest --save --save-exact
```
```json
"scripts": {
    "build": "ntsc -p ./src"
},
```
And then you just need to do the following to build your project:
```bash
npm run build
```

# About
Note that this is a personal endeavor, not officially by Microsoft.

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