Skip to content

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

Description

@arvidtorbjoernsen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions