Webroute

@webroute/routeNamespacesRouteFunctions

getOperationKeys

getOperationKeys<T>(route): InferPart<T, "Path"> extends $Path ? InferPart<T, "Methods"> extends $Methods ? `${Uppercase<$Methods>} ${$Path}`[] : [] : []

Gets all operation keys in the form {METHOD} {pathPattern}. Will return an empty array if either methods or path are undefined.

Type Parameters

Type Parameter
T extends AnyCompiledRoute

Parameters

ParameterType
routeT

Returns

InferPart<T, "Path"> extends $Path ? InferPart<T, "Methods"> extends $Methods ? `${Uppercase<$Methods>} ${$Path}`[] : [] : []

On this page