ReactiveX / ReactiveX/rxjs

.pipe fn type overloads no longer support using spread arguments

Open
#3,989 12 comments 40 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
31.7k
Forks
3k
PR merge metrics
No merged PRs in 30d

Description

Bug Report

Current Behavior
After #3945, the following is now a type error:

of(1, 2, 3).pipe(...[map((x) => x)]);

error TS2557: Expected at least 0 arguments, but got 0 or more.

Arguably, this is TS error as witnessed by the odd error msg.

Possible Solution
Not sure if it is possible to have the good behaviors #3945 introduced in terms of error reporting and passing spread args.

Contributor guide

Open the contributing guide

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

The issue names no source file or test; start by reviewing the .pipe overload changes from #3945 and reproduce the TypeScript error with the shown of/map example. Done means spread arguments compile again without regressing the error-reporting behavior introduced there.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.