# babel-preset-typescript > Babel preset for TypeScript. This preset includes the following plugins: - [transform-typescript](https://babeljs.io/docs/plugins/transform-typescript/) ## Example **In** ```javascript const x: number = 0; ``` **Out** ```javascript const x = 0; ``` ## Installation ```sh npm install --save-dev babel-preset-typescript ``` ## Usage ### Via `.babelrc` (Recommended) **.babelrc** ```json { "presets": ["typescript"] } ``` ### Via CLI ```sh babel --presets typescript script.ts ``` ### Via Node API ```javascript require("babel-core").transform("code", { presets: ["typescript"] }); ```