Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leave your opinion: asReadonly should only work in type level? #240

Open
yuhr opened this issue Apr 25, 2021 · 0 comments
Open

Leave your opinion: asReadonly should only work in type level? #240

yuhr opened this issue Apr 25, 2021 · 0 comments

Comments

@yuhr
Copy link
Collaborator

yuhr commented Apr 25, 2021

Probably isReadonly property doesn't make sense and is not effectively used for any relevant purpose of runtime type validation. I think it should be removed from runtime object and only work at compile-time, i.e. asReadonly should only transform the static typing of the Record or Array. (Additionaly, I believe it can even be removed from type parameters, just by doing type mapping instead)

I'd like to obtain users' opinions here about this. Do you use the property for runtime validation?

@yuhr yuhr pinned this issue Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant