
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
@types/babel-code-frame
Advanced tools
TypeScript definitions for babel-code-frame
npm install --save @types/babel-code-frame
This package contains type definitions for babel-code-frame (https://github.com/babel/babel/tree/master/packages).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel-code-frame.
interface BabelCodeFrameOptions {
/** Syntax highlight the code as JavaScript for terminals. default: false */
highlightCode?: boolean | undefined;
/** The number of lines to show above the error. default: 2 */
linesBelow?: number | undefined;
/** The number of lines to show below the error. default: 3 */
linesAbove?: number | undefined;
/**
* Forcibly syntax highlight the code as JavaScript (for non-terminals);
* overrides highlightCode.
* default: false
*/
forceColor?: boolean | undefined;
}
/**
* Generate errors that contain a code frame that point to source locations.
*
* @param rawLines Raw lines to frame
* @param lineNumber Line number (1 indexed)
* @param colNumber Column number
* @param options Additional options
*
* @returns Framed code
*/
declare function codeFrame(
rawLines: string,
lineNumber: number,
colNumber: number,
options?: BabelCodeFrameOptions,
): string;
export = codeFrame;
These definitions were written by Mohsen Azimi.
FAQs
TypeScript definitions for babel-code-frame
The npm package @types/babel-code-frame receives a total of 6,809 weekly downloads. As such, @types/babel-code-frame popularity was classified as popular.
We found that @types/babel-code-frame demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Security News
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.