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/plugin-syntax-typescript
Advanced tools
The @babel/plugin-syntax-typescript package is a plugin for Babel that allows Babel to parse TypeScript syntax. This means it enables Babel to understand TypeScript code, but it does not perform type checking or compilation to JavaScript. It's primarily used in projects that want to take advantage of Babel's transformations and plugins while writing their code in TypeScript.
Parsing TypeScript Syntax
This feature allows Babel to parse TypeScript code, including imports, exports, interfaces, and type annotations, without performing type checking. It's useful for projects that use Babel for code transformation and want to write their source code in TypeScript.
import { foo } from 'bar';
interface MyInterface {
myProperty: string;
}
const myVar: MyInterface = { myProperty: 'Hello' };
The TypeScript package is the official compiler for TypeScript. Unlike @babel/plugin-syntax-typescript, it performs both parsing and compilation of TypeScript code into JavaScript, including type checking. It's a more comprehensive solution for projects that are exclusively using TypeScript.
This package is an ESLint parser that allows ESLint to lint TypeScript code. It's similar to @babel/plugin-syntax-typescript in that it enables understanding of TypeScript syntax, but it's specifically focused on linting rather than transforming code.
ts-node is a TypeScript execution engine and REPL for Node.js. It allows you to directly run TypeScript files in Node.js without pre-compiling them. This is different from @babel/plugin-syntax-typescript, which only parses TypeScript syntax for Babel transformations and does not include an execution environment.
Allow parsing of TypeScript syntax
See our website @babel/plugin-syntax-typescript for more information.
Using npm:
npm install --save-dev @babel/plugin-syntax-typescript
or using yarn:
yarn add @babel/plugin-syntax-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
Allow parsing of TypeScript syntax
The npm package @babel/plugin-syntax-typescript receives a total of 25,787,690 weekly downloads. As such, @babel/plugin-syntax-typescript popularity was classified as popular.
We found that @babel/plugin-syntax-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.