Skip to content

More flexible record typing#256

Merged
soutaro merged 3 commits intomasterfrom
record-typing
Nov 14, 2020
Merged

More flexible record typing#256
soutaro merged 3 commits intomasterfrom
record-typing

Conversation

@soutaro
Copy link
Owner

@soutaro soutaro commented Nov 14, 2020

  • Support alias to record types (bug fix!)
  • Record types are now co-variant
  • Allows skipping nil-able attributes
# @type var x: { name: String, email: String? }
x = { name: "foo", email: "foo@example.com" }          # OK
x = { name: "foo", email: nil }                        # OK
x = { name: "foo" }                                    # OK 🐕 

* Make it covariant
* Allow skipping `nil`-able attributes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant