Skip to content

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

Merged
jdeniau merged 1 commit intoimmutable-js:mainfrom
alexvictoor:fix-seq-typings
Jan 11, 2025
Merged

fix: proper Typescript typings for Seq.concat()#2040
jdeniau merged 1 commit intoimmutable-js:mainfrom
alexvictoor:fix-seq-typings

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
@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