Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@babel/preset-typescript
Advanced tools
The @babel/preset-typescript package is a Babel preset for TypeScript, which allows Babel to parse and transform TypeScript code into JavaScript. This enables developers to use TypeScript's static typing features while leveraging Babel's ability to compile modern JavaScript to be compatible with older browsers or environments.
TypeScript Compilation
Compiles TypeScript code to JavaScript by stripping out type annotations and handling TypeScript-specific syntax.
const x: number = 10;
Support for TypeScript Features
Supports various TypeScript features like enums, interfaces, and namespaces, converting them to equivalent JavaScript code.
enum Color { Red, Green, Blue }; let c: Color = Color.Green;
Integration with Babel Toolchain
Easily integrates with the Babel toolchain, allowing TypeScript files to be included in Babel's build process alongside other JavaScript files.
module.exports = { presets: ['@babel/preset-typescript'] };
ts-loader is a TypeScript loader for webpack. It compiles TypeScript to JavaScript before bundling. It differs from @babel/preset-typescript in that it is specifically designed for use with webpack and uses the TypeScript compiler (tsc) directly rather than Babel.
Similar to ts-loader, awesome-typescript-loader is another loader for webpack that compiles TypeScript to JavaScript. It offers features like Babel integration and type checking in a separate process. It is an alternative to ts-loader and provides similar functionality to @babel/preset-typescript but with a focus on webpack integration.
The official TypeScript npm package provides the TypeScript compiler (tsc) which can be used to compile TypeScript files directly without Babel. It is more comprehensive in terms of TypeScript feature support compared to @babel/preset-typescript, which is focused on integrating TypeScript with Babel's ecosystem.
Babel preset for TypeScript.
See our website @babel/preset-typescript for more information or the issues associated with this package.
Using npm:
npm install --save-dev @babel/preset-typescript
or using yarn:
yarn add @babel/preset-typescript --dev
v7.25.7 (2024-10-02)
babel-helper-validator-identifier
babel-traverse
babel-plugin-transform-classes
super()
check (@nicolo-ribaudo)babel-generator
infer
in compact mode (@nicolo-ribaudo)[no LineTerminator here]
after nodes (@nicolo-ribaudo)babel-types
babel-core
--experimental-require-module
(@nicolo-ribaudo)babel-helper-compilation-targets
, babel-helper-plugin-utils
, babel-preset-env
babel-plugin-proposal-destructuring-private
, babel-plugin-syntax-decimal
, babel-plugin-syntax-import-reflection
, babel-standalone
babel-generator
[no LineTerminator here]
before nodes (@nicolo-ribaudo)babel-plugin-transform-typescript
babel-types
BABEL_TYPES_8_BREAKING
at startup (@nicolo-ribaudo)FAQs
Babel preset for TypeScript.
The npm package @babel/preset-typescript receives a total of 10,906,577 weekly downloads. As such, @babel/preset-typescript popularity was classified as popular.
We found that @babel/preset-typescript demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.