Skip to content

Incorrect types for Graph.query() params #83

Open
@fabiankaestner

Description

@fabiankaestner

The typescript type definitions for the query method force the params parameter to be a Map<any, any>, but the actual javascript function expects a dumb { [ key: string ]: any }.
Passing a Map causes the query to fail due to 'missing parameters', as expected.
Passing a normal JS object works, but requires typescript hacking like graph.query(query, params as unknown as Map<any, any>).
Am I missing something here or is this an actual error?

Activity

JonasHiltl

JonasHiltl commented on Jan 19, 2022

@JonasHiltl

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @fabiankaestner@JonasHiltl

        Issue actions

          Incorrect types for Graph.query() params · Issue #83 · RedisGraph/redisgraph.js