Closed blemoine closed 7 months ago
This is pretty much the case for every option. Not sure it provide much value.
If you try the following code
const columns = ['name', 'age'] as const
stringify({columns})
without this PR patch, it won't compile - even though it's perfectly valid at runtime.
Recently, I encountered the same problem. It would be helpful to support values declared as const
.
Then I propose to update this PR to apply const
to every option.
The Input
type should be readonly too.
The goal is for stringify to support values declared
as const
.eg.
As this array has no reasons to be mutated by
stringify
it's simpler to set it asreadonly
.