Alexandro.Net

Version 1.0.0

@stackline/types-concat-stream

TypeScript definitions for concat-stream

Independent maintenance of @types/concat-stream 2.0.3. Original authors and licenses are retained.

Installation

# Preserve existing imports with an npm alias
npm install @types/concat-stream@npm:@stackline/types-concat-stream@1.0.0
# Or use the scoped package name in your imports
npm install @stackline/types-concat-stream@1.0.0

Node.js: See compatibility notes. Read the compatibility and maintenance notes before migrating.

Usage and API

The reference below may retain upstream package names. Use the alias installation above to run those imports with this Stackline release.

@stackline/types-concat-stream

Maintained TypeScript declaration fork of @types/concat-stream@2.0.3. This package supplies declarations, not JavaScript runtime code. The original declarations, contributors and MIT license are retained; focused changes are listed in CHANGELOG.md.

npm install --save-dev @stackline/types-concat-stream@1.0.0
# Keep existing type imports and automatic @types discovery:
npm install --save-dev @types/concat-stream@npm:@stackline/types-concat-stream@1.0.0

For direct installation, use @stackline/types-concat-stream in type imports, or in compilerOptions.types for Jest globals. Aliasing to @types/concat-stream preserves the upstream module names. Requires TypeScript 4.5 or newer, subject to the dependencies selected by your lockfile. No library runtime engine requirement is introduced. Development tooling uses Node.js24.

Source and issue review · Issues · npm · Stackline

Original package documentation

Installation

npm install --save @types/concat-stream

Summary

This package contains type definitions for concat-stream (https://github.com/maxogden/concat-stream).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/concat-stream.

index.d.ts

/// <reference types="node" />

import { Writable } from "stream";

declare function concat(cb: (buf: Buffer) => void): Writable;
declare function concat(opts: { encoding: "buffer" | undefined } | {}, cb: (buf: Buffer) => void): Writable;
declare function concat(opts: { encoding: "string" }, cb: (buf: string) => void): Writable;
declare function concat(opts: { encoding: "array" }, cb: (buf: bigint[]) => void): Writable;
declare function concat(opts: { encoding: "uint8array" | "u8" | "uint8" }, cb: (buf: Uint8Array) => void): Writable;
declare function concat(opts: { encoding: "object" }, cb: (buf: object[]) => void): Writable;

export = concat;

Additional Details

Credits

These definitions were written by Joey Marianer.

Upstream issues and maintenance review

Upstream and review

Issue review

GitHub search on 2026-09-29 used repo:DefinitelyTyped/DefinitelyTyped is:issue is:open "concat-stream" and the corresponding closed query. Counts: open: 0 results (collected 0), closed: 1 results (collected 1). Search results can contain unrelated packages; they are not evidence that every result is a defect here. Archived search responses and baseline comparisons are retained in the release research evidence. No issue was posted or modified.

The one matching closed issue #17491 concerns DefinitelyTyped publishing infrastructure, not concat-stream declarations. Local API/compile comparison checks the encoding overloads.

Validation

Real declaration usage and negative type assertions are compiled with TypeScript 4.5.5 and 5.9.3, with strict: true and skipLibCheck: false, from source and isolated direct/alias tarball installs. CI also checks the complete dependency audit, CodeQL, package contents and exact CI archive identity before GitHub-only publication. Registry verification compiles direct and aliased installs rather than importing these type-only packages as JavaScript.

The selected declaration incorrectly restricted encoding: "array" results to bigint[]. The runtime concatenates arrays without converting elements; source and a real number/string array execution confirm this. The original numeric-array compile fixture failed with TS2322. The overload now returns any[], preserving existing bigint consumers while allowing number/string/object arrays; other encoding constraints have positive and negative compile tests.

The Node ambient dependency is tested against @types/node18.11.18 with TypeScript4.5 and @types/node24.12.2 with TypeScript5.9. Both compiler generations use skipLibCheck: false; explicit type roots select the matching ambient declarations. This does not pin or alter the package's inherited @types/node: * dependency.

Release changes

Changelog

1.0.0

The selected declaration incorrectly restricted encoding: "array" results to bigint[]. The runtime concatenates arrays without converting elements; source and a real number/string array execution confirm this. The original numeric-array compile fixture failed with TS2322. The overload now returns any[], preserving existing bigint consumers while allowing number/string/object arrays; other encoding constraints have positive and negative compile tests.

Release files and references

Package bytes, npm provenance and the immutable GitHub release were verified for this version. Security checks describe the reviewed release; documented compatibility risks and upstream reports are not blanket claims of resolution.