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
The record type definition forces all keys to be passed, whereas in most cases, one already handles the case to a default when one of the record values isn't passed. Picking up the linked example:
{id: Integer,name: String}# Hash object like `{ id: 31, name: "John" }`# However, I want to handle# Hash object like `{ name: "John" }` where id is attributed inside the function# this isn't handled because I can't define# { ?id: Integer, name: String } # like for kwargs
The only way to support this right now is to repeat all combinations in a type definition, which is a bit brittle.
WDYT?
The text was updated successfully, but these errors were encountered:
@soutaro do you think it's time for devising a plan for this? Caught this again while using steep and stdlib's URI::Generic.build signature, which is currently incorrect, as it expects all options to be passed, whereas they're all optional.
The record type definition forces all keys to be passed, whereas in most cases, one already handles the case to a default when one of the record values isn't passed. Picking up the linked example:
The only way to support this right now is to repeat all combinations in a type definition, which is a bit brittle.
WDYT?
The text was updated successfully, but these errors were encountered: