pinojs / pinojs/thread-stream

index.d.ts uses removed worker_threads.TransferListItem (@types/node@26)

Open Beginner friendly
#228 0 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
261
Forks
31
Avg merge
2d 9h
Merged PRs (30d)
4

Description

Problem

@types/node@26 removed the deprecated TransferListItem alias from worker_threads (only Transferable remains). thread-stream@4.2.0 still references workerThreads.TransferListItem[] in index.d.ts line 96:

emit(eventName: 'message', message: any, transferList?: workerThreads.TransferListItem[]): boolean

With skipLibCheck: false, TypeScript reports:

error TS2694: Namespace '"worker_threads"' has no exported member 'TransferListItem'.

Context

  • @types/node@25 kept TransferListItem as a deprecated alias of Transferable
  • @types/node@26 removed the alias per DefinitelyTyped Node 26 migration
  • Latest npm release 4.2.0 and main branch still use TransferListItem

Suggested fix

Replace workerThreads.TransferListItem[] with workerThreads.Transferable[] in index.d.ts (same direction as the @types/node deprecation note).

Workaround

Consumers can pnpm-patch the one-line change until a release ships.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at index.d.ts line 96 and inspect the worker_threads type used in the emit signature. Verify the issue with @types/node@26 and skipLibCheck: false, then confirm the declaration type-checks successfully and no longer references the removed alias.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.