-
Notifications
You must be signed in to change notification settings - Fork 7
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
Precise typing of embeds #11
Comments
We can probably generate a type like Do you have some specific examples for the |
thank you for your rapid reply! |
Currently strukt typing
embeds_one :foo, Foo
's type asFoo.t()
,embeds_many :foos, Foo
as[Foo.t()]
:strukt/lib/typespec.ex
Lines 72 to 77 in 2b6c643
it couldn't handle situations like
:foo
field could be null which type should beFoo.t() | nil
,:foos
could be nil, but element couldn't:[Foo.t()] | nil
:foos
could be nil, element's could be nil too:nil | [Foo.t() | nil]
any idea for handle these cases?
The text was updated successfully, but these errors were encountered: