Skip to content

fix: proper Typescript typings for Seq.concat() #2040

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 11, 2025

Conversation

alexvictoor
Copy link

This PR fixes an issue occurring when a sequence is typed as a regular Seq (not an IndexedSeq, keyedSeq, ...).
Below a code fragment to reproduce the issue:

let seq = Seq();
seq = seq.concat(1): // TS error here because seq.concat() return type is Collection<unknown, unknown> instead of Seq<unknown, unknown>

@jdeniau jdeniau merged commit a2bc1b4 into immutable-js:main Jan 11, 2025
5 checks passed
@jdeniau jdeniau mentioned this pull request Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants