Skip to content

typedefinition for nested queries #245

@TobiasNickel

Description

@TobiasNickel

Hi, I am about to use sift with my npm module TRDB. tldr: it is a json-file db.
I wanted to add support for mongo-queries and use sift for that.

And I found some issue with the typescript definitions when using a nested query:
in the picture is the you see that address.street has the wrong type definition, the picture also show, that the execution is actually working correct and I find the element with address.streed=mainStreet.
Screenshot_2022-03-02_03-22-46

the typescript error is Type '{ $in: string }' is not assignable to type 'string' ts(2322)

my version is 16.0.0,
the typescript version is 4.0.3

Do you know how to get the nested type definitions right?
wand to play with the code: here is the gist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions