ts-routes
Version:
Strongly typed routes management
8 lines (7 loc) • 412 B
TypeScript
import { Optionality } from "./helpers";
import QueryParamDescription from "./QueryParamDescription";
declare type AllowedQueryParams = string | {
[key: string]: AllowedQueryParams;
};
export default function query<TReturnType extends AllowedQueryParams = string, TOptionality extends Optionality = "required">(optionality?: TOptionality): QueryParamDescription<TReturnType, TOptionality>;
export {};