Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@types/worker-threads-pool
Advanced tools
TypeScript definitions for worker-threads-pool
npm install --save @types/worker-threads-pool
This package contains type definitions for worker-threads-pool (https://github.com/watson/worker-threads-pool#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/worker-threads-pool.
/// <reference types="node" />
import { Worker, WorkerOptions } from "worker_threads";
export = Pool;
declare class Pool {
constructor(options?: Pool.Options);
/**
* Number of active workers in the pool.
*/
size: number;
/**
* @param filename argument passed directly to `new Worker(filename, options)`
* @param options argument passed directly to `new Worker(filename, options)`
* @param callback will be called once the worker is created
*/
acquire(filename: string, callback: (error: Error | null, worker: Worker) => void): void;
acquire(
filename: string,
options: WorkerOptions,
callback: (error: Error | null, worker: Worker) => void,
): void;
/**
* Calls `worker.terminate()` on all workers in the pool.
* @param callback will be called once all workers have terminated
*/
destroy(callback?: () => void): void;
}
declare namespace Pool {
interface Options {
/**
* Maximum number of workers allowed in the pool. Other workers will be queued
* and started once there's room in the pool.
* @default 1
*/
max?: number | undefined;
/**
* Maximum number of workers waiting to be started when the pool is full.
* The callback to `pool.acquire` will be called with an error in case this limit is reached.
*/
maxWaiting?: number | undefined;
}
}
These definitions were written by BendingBender.
FAQs
TypeScript definitions for worker-threads-pool
The npm package @types/worker-threads-pool receives a total of 346 weekly downloads. As such, @types/worker-threads-pool popularity was classified as not popular.
We found that @types/worker-threads-pool 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.