typed_struct
typed_struct copied to clipboard
An Elixir library for defining structs with a type without writing boilerplate code.
Hi there, we've been working with TypedStruct a lot recently, and it's really nice. I think that it makes Elixir type system much more approachable, and is also in line...
Add TypedStructCtor to the Plugin section The TypedStructCtor plugin uses field-level attributes to define constructor functions (`new` and `from`) on the struct being defined by `TypedStruct` Includes a Livebook demo...
I have a typedstruct defined in this way: ```elixir defmodule Msg do use TypedStruct typedstruct do field(:version, default: 1) field(:note, String.t(), default: "") end end ``` If I default construct...
When running the tests on Elixir 1.14.0 / OTP 24, I can see a lot of failures. After my first investigations it seems that neither the `@type` nor the `@enforce_keys`...
@ejpcmac, it appears that your project is no longer actively maintained. The pull requests have been awaiting since Oct'22. Would you consider either adding me as the owner or transferring...
This is what I want to write: ```elixir @derive Jason.Encoder typedstruct module: Foo do field :bar, :string end ``` ``` > mix compile warning: warning: module attribute @derive was set...
Hi, I've seen that you have default type checking in the roadmap and I think it would be amazing to have that. May I ask if you have any ideas...
Could you extend this library for defining Record's? E.g. presently: ``` Record.defrecord(:conn, [ name: nil, pid: nil, mon: nil ]) @type conn :: record(:conn, [ name: atom, pid: pid, mon:...