export interface ParseOptions {
arrayFormat?: 'bracket' | 'index' | 'none';
decode?: boolean;
}export interface OutputParams {
[key: string]: string | string[] | undefined;
}export function parse(str: string, options?: ParseOptions): OutputParams;这种在 export interface ParseOptions .d.ts 文件中是什么作用?在编辑器中使用 parse方法时,也没有提示具体的如参类型,只是提示了 ParseOptions?
1 回答

心有法竹
TA贡献1866条经验 获得超5个赞
export interface ParseOptions { arrayFormat?: 'bracket' | 'index' | 'none' decode?: boolean}export interface OutputParams { [key: string]: string | string[] | undefined}export declare function parse(str: string, options?: ParseOptions): OutputParams
添加回答
举报
0/150
提交
取消