the readonly keyword is quite new, but ReadonlyArray has been around since TypeScript 2 and they are the 100% same thing, and i see that ReadonlyArray is already used in a few places.
Sorry to not give you a PR, I'm having issues with running the tests here.
Hi,
I was using your library today and I ran into a minor issue, non mutating functions aren't using readonly array types.
Take sumBy for instance: https://github.com/simontonsoftware/s-libs/blob/master/projects/micro-dash/src/lib/math/sum-by.ts i cannot pass in a
readonly number[]
(previously written asReadonlyArray<number>)
, so I have to cast my input intonumber[]
to pass the type checker. chunkBy, and uniqBy have the same problem, and there must be many others.the readonly keyword is quite new, but ReadonlyArray has been around since TypeScript 2 and they are the 100% same thing, and i see that ReadonlyArray is already used in a few places.
Sorry to not give you a PR, I'm having issues with running the tests here.