Skip to content

ft.aggregate mismatch with function signature in typescript #2620

Open
@TheUncharted

Description

@TheUncharted

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions