Closed apawsey closed 6 years ago
Hi 😄
There is already an IQueryable<T>
interface that abstracts all readonly methods from all collection types.
It can be used as return or member type to explicitly force that the content is constant (readonly).
Is that what you need? if not, please give me an example of your proposal
Thanks a lot ;D
I splitted IList
and IDictionary
into different interfaces:
IReadOnlyList<T>
, IList<T> (extends readonly list)
IReadOnlyDictionary<K,T>
, IDictionary<K,T> (extends readonly dictionary)
Both IList
and IDictionary
have asReadOnly()
method (simple internal cast)
Hey...
I'm still getting busy trying to add contributions, don't think I've forgotten :smile:
In the meantime, I just wondered if you've thought about adding 'readonly' collections? I know it's never going to be exactly perfect in the typescript/javascript world, but it's a nice addition to imply usage to users of exposed properties.
Thanks.