index.d.ts uses removed worker_threads.TransferListItem (@types/node@26)
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@25keptTransferListItemas a deprecated alias ofTransferable@types/node@26removed the alias per DefinitelyTyped Node 26 migration- Latest npm release
4.2.0andmainbranch still useTransferListItem
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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