Wayfinder.Processor.Route (Wayfinder Ex v0.1.4)
View SourceRepresents a simplified Phoenix route for TypeScript generation.
Summary
Functions
Converts a raw %Phoenix.Router.Route{} into a %Wayfinder.Route{}.
Generate a JS-safe method name for controller actions
Types
@type params_by_method() :: %{required(String.t()) => [param_spec()]}
@type t() :: %Wayfinder.Processor.Route{ action: atom(), alias: String.t(), all_params: [param_spec()], controller: module(), file: String.t() | nil, line: pos_integer() | nil, methods: [String.t()], original_action: atom(), params_by_method: params_by_method(), path: String.t() }
Functions
@spec from_phoenix_route(Phoenix.Router.Route.t(), phoenix_route_opts()) :: t()
Converts a raw %Phoenix.Router.Route{} into a %Wayfinder.Route{}.
Generate a JS-safe method name for controller actions