Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@types/through2
Advanced tools
TypeScript definitions for through2
npm install --save @types/through2
This package contains type definitions for through2 (https://github.com/rvagg/through2).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/through2.
/// <reference types="node" />
import stream = require("stream");
declare function through2(transform?: through2.TransformFunction, flush?: through2.FlushCallback): stream.Transform;
declare function through2(
opts?: stream.DuplexOptions,
transform?: through2.TransformFunction,
flush?: through2.FlushCallback,
): stream.Transform;
declare namespace through2 {
interface Through2Constructor extends stream.Transform {
new(opts?: stream.DuplexOptions): stream.Transform;
(opts?: stream.DuplexOptions): stream.Transform;
}
type TransformCallback = (err?: any, data?: any) => void;
type TransformFunction = (
this: stream.Transform,
chunk: any,
enc: BufferEncoding,
callback: TransformCallback,
) => void;
type FlushCallback = (this: stream.Transform, flushCallback: () => void) => void;
/**
* Convenvience method for creating object streams
*/
function obj(transform?: TransformFunction, flush?: FlushCallback): stream.Transform;
/**
* Creates a constructor for a custom Transform. This is useful when you
* want to use the same transform logic in multiple instances.
*/
function ctor(transform?: TransformFunction, flush?: FlushCallback): Through2Constructor;
function ctor(
opts?: stream.DuplexOptions,
transform?: TransformFunction,
flush?: FlushCallback,
): Through2Constructor;
}
export = through2;
These definitions were written by Bart van der Schoor, Georgios Valotasios, TeamworkGuy2, and Alorel.
FAQs
TypeScript definitions for through2
The npm package @types/through2 receives a total of 43,509 weekly downloads. As such, @types/through2 popularity was classified as popular.
We found that @types/through2 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.