BuildAction

View Source

Summary

Builds an Action type from a string pattern, RoutePattern, or Route.

Signature

type BuildAction<method, route, context> = route extends string
  ? Action<method, route, context>
  : route extends RoutePattern<infer pattern>
    ? Action<method, pattern, context>
    : route extends Route<infer _, infer pattern>
      ? Action<method, pattern, context>
      : never;