node-redis icon indicating copy to clipboard operation
node-redis copied to clipboard

ft.aggregate mismatch with function signature in typescript

Open TheUncharted opened this issue 1 year ago • 0 comments

Description

Hi

I got this error in VS code for ft.aggregate , it warns me of an error but when i run the code it works without errors

image

Argument of type '["index", string, { STEPS: { type: AggregateSteps.GROUPBY; properties: "@category"[]; REDUCE: { type: AggregateGroupByReducers.COUNT; property: string; AS: string; }[]; }[]; }]' is not assignable to parameter of type '[index: string, query: string, options?: AggregateOptions | undefined] | [options: CommandOptions<ClientCommandOptions>, index: string, query: string, options?: AggregateOptions | undefined]'. Type '["index", string, { STEPS: { type: AggregateSteps.GROUPBY; properties: "@category"[]; REDUCE: { type: AggregateGroupByReducers.COUNT; property: string; AS: string; }[]; }[]; }]' is not assignable to type '[options: CommandOptions<ClientCommandOptions>, index: string, query: string, options?: AggregateOptions | undefined]'. Type at position 0 in source is not compatible with type at position 0 in target. Type 'string' is not assignable to type 'CommandOptions<ClientCommandOptions>'. Type 'string' is not assignable to type '{ readonly [symbol]: true; }'.ts(2345)

Node.js Version

v19.1.0

Redis Server Version

6.2.6

Node Redis Version

4.6.8

Platform

Windows + WSL 2

Logs

No response

TheUncharted avatar Sep 26 '23 06:09 TheUncharted