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
{{ message }}
Repository navigation
Reactive collections should type arguments as immutable #21074
The utilities for creating tracked collections that are exported from @ember/reactive/collections are documented to treat their arguments as immutable, but are typed to only accept mutable arguments. For example, the following produces a type error:
because @items is a readonly string[] and trackedArray is typed to accept T[], not readonly T[]. The various other utilities have similarly mutable-typed arguments.
🔬 Minimal Reproduction
See above
😕 Actual Behavior
Type error -- unable to pass immutable collections to the reactive utilities
🤔 Expected Behavior
No type error -- should be able to pass immutable collections to the reactive utilities
Activity