Skip to content
Yet another Babel preset for TypeScript, only transforms proposals which TypeScript does not support now.
TypeScript JavaScript Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
scripts ci: try GitHub Actions without Travis CI Nov 10, 2019
.prettierrc.js feat: better TypeScript support Nov 10, 2019
.renovaterc chore: use preset itself for tests Aug 17, 2019
LICENSE docs: fix incorrect link reference of v8intrinsic Nov 10, 2019
babel.config.js fix: compatible with decorators + class properties Oct 9, 2019
codechecks.yml refactor: mv sources to src folder (#58) Sep 9, 2019


GitHub Actions Codecov Codacy Grade npm GitHub Release

David Peer David David Dev

Conventional Commits JavaScript Style Guide Code Style: Prettier

Yet another Babel preset for TypeScript, only transforms proposals which TypeScript does not support now.

So that you can use babel to transform proposals which are current in stage 0-2 and TypeScript team will not implement them temporarily.


Enabled proposal plugins

  1. class-properties
  2. do-expressions
  3. function-bind
  4. function-sent
  5. json-strings
  6. logical-assignment-operators
  7. partial-application
  8. pipeline-operator
  9. private-methods
  10. throw-expressions
  11. v8intrinsic - Further Detail


# yarn
yarn add -D babel-preset-proposal-typescript

# npm
npm i -D babel-preset-proposal-typescript


option description defaults
classLoose whether to use loose mode for class properties and private methods true
decoratorsBeforeExport See Babel Document undefined
decoratorsLegacy whether to use legacy decorators semantic true
isTSX whether to enable jsx plugin with typescript false, but true for /\.[jt]sx$/
pipelineOperator implementation of pipeline operator "minimal"


Via .babelrc (Recommended)


  "presets": ["proposal-typescript"]


babel input.ts --presets proposal-typescript >output.ts

Via Node API

require('@babel/core').transform('code', {
  presets: ['proposal-typescript'],

Via webpack

Pipe codes through babel-loader.

loader = {
  test: /\.[jt]sx?$/,
  loader: 'babel-loader',
  options: {
    presets: ['proposal-typescript'],

// if you prefer `ts-loader` or `awesome-typescript-loader`
loader = {
  test: /\.tsx?$/,
  use: [
      loader: 'ts-loader',
      loader: 'babel-loader',
      options: {
        presets: ['proposal-typescript'],
You can’t perform that action at this time.