About the authoring of .d.ts

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;

what is the role of this in the export interface ParseOptions .d.ts file? When you use the parse method in the editor, you don"t prompt for a specific parameter type, just ParseOptions?

May.17,2022


? ?

export interface ParseOptions {
    arrayFormat?: 'bracket' | 'index' | 'none';
    decode?: boolean;
}
Menu