In https://hexdocs.pm/elixir/typespecs.html
There’s a definition for map literals:
| %{} # empty map
| %{key: value_type} # map with required key :key of value_type
| %{required(key_type) => value_type} # map with required pairs of key_type and value_type
| %{optional(key_type) => value_type} # map with optional pairs of key_type and value_type
| %SomeStruct{} # struct with all fields of any type
| %SomeStruct{key: value_type} # struct with required key :key of value_type
Does anyone know if
%{key: value_type}
implies the presence of optional(any) => any
in addition to the required key?