You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Either make it so that task sequencing does not produce readonly arrays or make the array module compatible with readonly arrays.
Additional context
It seems that there's an effort going on to move sequencing logic to use readonly arrays. While I'm ofc in favor of immutability where possible I don't think using readonly here adds any benefit to fp-ts. Even if I wanted to mutate the returned array, that should be my prerogative as a dev and it should not impact fp-ts in any way.
Your environment
Which versions of fp-ts are affected by this issue? Did this work in previous versions of fp-ts?
Software
Version(s)
fp-ts
2.16.2
TypeScript
5.3.3
The text was updated successfully, but these errors were encountered:
🐛 Bug report
Current Behavior
Using task sequencing yields a
readonly
array which is incompatible with array mappingExpected behavior
Sequencing Tasks should work with Array mapping.
Reproducible example
https://codesandbox.io/p/sandbox/fp-ts-sequencing-readonly-kndpz5?file=%2Fsrc%2Findex.ts
Suggested solution(s)
Either make it so that task sequencing does not produce readonly arrays or make the array module compatible with
readonly
arrays.Additional context
It seems that there's an effort going on to move sequencing logic to use readonly arrays. While I'm ofc in favor of immutability where possible I don't think using
readonly
here adds any benefit tofp-ts
. Even if I wanted to mutate the returned array, that should be my prerogative as a dev and it should not impact fp-ts in any way.Your environment
Which versions of fp-ts are affected by this issue? Did this work in previous versions of fp-ts?
The text was updated successfully, but these errors were encountered: