AUR0220
Error Message
AUR0220: Map/Set "size" is a readonly property
Description
This error occurs when a binding or assignment tries to write to the size property of a Map or Set. size is readonly in JavaScript and cannot be assigned to.
Example Trigger
<!-- ❌ size is readonly -->
<template>
<input value.bind="mySet.size">
</template>Solution
Bind to
sizeas a read-only value (one-way/from-view), or expose a derived property.Mutate the
Map/Setvia its methods (add,delete,clear) rather than assigning tosize.
Last updated
Was this helpful?