I’m looking for a typespec that would match, for instance:
%Foo{specific_key: "abc"}
%Bar{specific_key: "abc"}
%Baz{specific_key: "abc"}
I’m using %{specific_key: String.t()}
but that can match maps as well. Is there something like %_{specific_key: String.t()}
as there is for pattern matching (%_{...}
) for typespec?