Closed ForbesLindesay closed 3 years ago
Added Readonly
helper type
The Readonly
helper type can be passed an Object
, Array
, Tuple
or Record
funtype and will convert it into the read only equivalent. The Object
and Array
types still have the asReadonly()
method, but you should use Readonly(...)
for new code as the asReadonly()
method may eventually be removed to reduce the bundle size
This supports
Object
,Array
,Tuple
andRecord
. I have not removed theasReadonly
utilities fromObject
orArray
, but thisReadonly
helper should probably be preferred going forwards as it will lead to a lower bundle size because it can be shared among all types.[closes #50]