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
Parameter | Type |
---|---|
route | T |
Returns
InferPart
<T
, "Path"
> extends $Path
? InferPart
<T
, "Methods"
> extends $Methods
? `${Uppercase<$Methods>} ${$Path}`[] : [] : []