
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.
TypeScript definitions for tx2
npm install --save @types/tx2
This package contains type definitions for tx2 (https://github.com/pm2/tx2).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/tx2.
/// <reference types="node" />
import EventEmitter = require("node:events");
interface ErrorObject {
name: string;
message: string;
}
interface Metric<T> {
val: () => T;
set: (data: T) => void;
}
interface MetricOptions<T> {
name: string;
value: T;
unit?: string;
}
interface Counter {
val: () => number;
inc: (amount: number) => void;
dec: (amount: number) => void;
reset: () => void;
}
interface CounterOptions {
name: string;
unit: string;
}
declare class TX2 extends EventEmitter {
event(name: string, data: object): void;
action(action_name: string, callback: (cb: (data: any) => void) => void): void;
action<T extends object>(
action_name: string,
options: T,
callback: (options: T, cb: (data: any) => void) => void,
): void;
issue(err: string): string;
issue(err: Error): ErrorObject;
metric<T>(name: string, cb: () => T): Metric<T>;
metric(name: string, cb: number): Metric<number>;
metric<T>(name: string, unit: string, cb: () => T): Metric<T>;
metric(name: string, unit: string, cb: number): Metric<number>;
metric<T>(options: MetricOptions<T>): Metric<T>;
counter(name: string | CounterOptions): Counter;
}
declare const tx2: TX2;
export = tx2;
These definitions were written by Sasial.
FAQs
TypeScript definitions for tx2
The npm package @types/tx2 receives a total of 935 weekly downloads. As such, @types/tx2 popularity was classified as not popular.
We found that @types/tx2 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.