Current section
Files
Jump to
Current section
Files
src/internal@common@pokemon_type.erl
-module(internal@common@pokemon_type).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export([types/0]).
-export_type([type/0]).
-type type() :: {type, integer(), internal@common@affordance:affordance()}.
-spec types() -> decode:decoder(type()).
types() ->
_pipe = decode:into(
(decode:parameter(
fun(Slot) ->
decode:parameter(
fun(Affordance) -> {type, Slot, Affordance} end
)
end
))
),
_pipe@1 = decode:field(
_pipe,
<<"slot"/utf8>>,
{decoder, fun gleam@dynamic:int/1}
),
decode:field(
_pipe@1,
<<"type"/utf8>>,
internal@common@affordance:affordance()
).