Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/basarat/byots
Bring your own TypeScript with more internal definitions
https://github.com/basarat/byots
Last synced: 1 day ago
JSON representation
Bring your own TypeScript with more internal definitions
- Host: GitHub
- URL: https://github.com/basarat/byots
- Owner: basarat
- Created: 2016-07-24T00:36:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-01-28T22:21:49.000Z (12 months ago)
- Last Synced: 2025-01-11T08:06:52.579Z (8 days ago)
- Language: TypeScript
- Homepage:
- Size: 12.5 MB
- Stars: 269
- Watchers: 10
- Forks: 10
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
- awesome-github-star - byots
- jimsghstars - basarat/byots - Bring your own TypeScript with more internal definitions (TypeScript)
README
# Bring your own TypeScript
[![Downloads](http://img.shields.io/npm/dm/byots.svg)](https://npmjs.org/package/byots)
[![Continuous Integration](https://github.com/basarat/byots/actions/workflows/ci.yml/badge.svg)](https://github.com/basarat/byots/actions/workflows/ci.yml)**Use the latest** [**TypeScript**](https://github.com/Microsoft/TypeScript), **with complete access to the compiler API** 🌹
[![NPM](https://nodei.co/npm-dl/byots.png)](https://nodei.co/npm/byots/)
**Still Just TypeScript**
* `byots` will use whatever TypeScript version you install *in your application*. So you are actually using whatever TypeScript you bring in. However we highly recommend `npm install typescript@next byots@latest` so you don't get any `JavaScriptFromTypeScript - TypeDefinitionFromByots` inconsistencies.
**But with the following advantage**
With a liberal definition file. We expose internal APIs.
> The definitions are updated daily automatically and our version numbers match the TypeScript nightly version numbers.
If you are working with the TypeScript compiler using `import * as ts from 'typescript'` and `ts` has everything you need, then use that. Otherwise if you find some API that isn't available on `ts.` but you can see if you do `console.log(ts)`, then you would consider using `byots`.
## Install
In your package.json```sh
npm install byots@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` so you know exactly what you tested with.
## Usage
### Require
Use `import * as ts from 'byots'` and you get what `import * as ts from 'typescript'` would give you.# Alternatives
## ts-expose-internals
https://github.com/nonara/ts-expose-internals
* `ts-expose-internals` builds for new releases only to provide better stability - `byots` is nightly for bleeding edge experimentation.
* `ts-expose-internals` uses module augmentation so you `import typescript` - `byots` reexports typescript so you `import byots`.