UNPKG

886 BTypeScriptView Raw
1export declare type arrayFormat = 'none' | 'brackets' | 'index';
2export declare type booleanFormat = 'none' | 'string' | 'unicode' | 'empty-true';
3export declare type nullFormat = 'default' | 'string' | 'hidden';
4export interface IOptions {
5 arrayFormat?: arrayFormat;
6 booleanFormat?: booleanFormat;
7 nullFormat?: nullFormat;
8}
9export interface IFinalOptions {
10 arrayFormat: arrayFormat;
11 booleanFormat: booleanFormat;
12 nullFormat: nullFormat;
13}
14export declare const makeOptions: (opts?: IOptions) => IFinalOptions;
15export declare const decodeValue: (value: string) => string;
16export declare const encodeArray: (name: string, arr: any[], opts: IFinalOptions) => string;
17export declare const encode: (name: string, value: any, opts: IFinalOptions) => string;
18export declare const decode: (value: any, opts: IFinalOptions) => string | boolean | null;