UNPKG

nested-query-params

Version:
19 lines (18 loc) 877 B
export declare type MaybeArray<T> = T | Array<MaybeArray<T>>; export declare type QueryParamKey = string; export declare type QueryParamVal = MaybeArray<SearchParams | string>; export declare type QueryParam = [QueryParamKey, QueryParamVal]; export declare type QueryParams = { [key: QueryParamKey]: SearchParamVal; }; export declare enum QueryParamPathComponentKind { Map = 0, List = 1 } export declare type QueryParamPathComponent = [QueryParamPathComponentKind.Map, string] | [QueryParamPathComponentKind.List]; export declare type SearchParamKey = QueryParamKey; export declare type SearchParamVal = QueryParamVal; export declare type SearchParam = QueryParam; export declare type SearchParams = QueryParams; export declare type SearchParamPathComponentKind = QueryParamPathComponentKind; export declare type SearchParamPathComponent = QueryParamPathComponent;