Debian Codegraph @

packages/search/lib/commands/SUGADD.ts

raw
1 interface SugAddOptions {
2 INCR?: true;
3 PAYLOAD?: string;
4 }
5
6 export function transformArguments(key: string, string: string, score: number, options?: SugAddOptions): Array<string> {
7 const args = ['FT.SUGADD', key, string, score.toString()];
8
9 if (options?.INCR) {
10 args.push('INCR');
11 }
12
13 if (options?.PAYLOAD) {
14 args.push('PAYLOAD', options.PAYLOAD);
15 }
16
17 return args;
18 }
19
20 export declare function transformReply(): number;