You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It may be useful to allow sorbet-coerce to blow up on unknown keys
Steps to reproduce:
classFoo < T::Structconst:bar,StringendTypeCoerce[Foo].new.from({bar: "Hello",foo: "New key!"})# => <Foo bar="Hello"># The above succeeds, but I'd like it to (configurably) blow up as `foo` is not known.
Versions:
Ruby: 2.7
Sorbet: 0.5
Sorbet-Coerce: 0.5.0
I re-re-read the docs but don't think it is currently possible.
Is it, and if not would you like it to be, when configured?
The text was updated successfully, but these errors were encountered:
Hi @hlascelles, this sounds like a reasonable feature request. Are you interested in implementing the feature/creating a PR? If not, I can add it to my backlog!
Sorry for the delay... Just nipped this comment in before the anniversary.
If you think it would be quick for you, that would be great, please do add to backlog! I may try and have a go at some point myself, but not sure when...
No worries @hlascelles! Unfortunately I don't work at CZI anymore (and don't have the keys to push, make releases, etc.). Hopefully someone else on the team could help you out - they should be able to cut a release if you open a PR yourself!
Potential new feature
It may be useful to allow sorbet-coerce to blow up on unknown keys
Steps to reproduce:
Versions:
I re-re-read the docs but don't think it is currently possible.
Is it, and if not would you like it to be, when configured?
The text was updated successfully, but these errors were encountered: