Potential new feature
It may be useful to allow sorbet-coerce to blow up on unknown keys
Steps to reproduce:
class Foo < T::Struct
const :bar, String
end
TypeCoerce[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?
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?