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
typed_struct helps you define a @type for a given struct by writing less code, it does not check anything. You then need to use Dialyzer or other type-checking tools to type-check your code. This is how Elixir currently works.
Domo is known to work with TypedStruct, though I’ve not used it myself yet.
I’m closing this one as it is essentially a duplicate of #3.
It doesn't make a lot of sense for me to just define the types and not enforce.
Example -
I create a typed struct like this -
and then it is still allowing this to be set other than list -
Would make more sense if it could actually validate the type.
At first, it gives this false impression that it would validate it, but it doesn't.
Even with using
enforce: true
, it just checks for the key to be present. Not the type.The text was updated successfully, but these errors were encountered: