Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Feature: Add Typing Support for Query #581

Open
2 tasks done
stnguyen90 opened this issue Oct 21, 2022 · 1 comment · May be fixed by #655
Open
2 tasks done

🚀 Feature: Add Typing Support for Query #581

stnguyen90 opened this issue Oct 21, 2022 · 1 comment · May be fixed by #655

Comments

@stnguyen90
Copy link
Contributor

🔖 Feature description

As a developer, I'd like to be able to have my IDE suggest/autocomplete attribute and check the type of value when creating a Query.

🎤 Pitch

Using the web SDK and TypeScript as an example, it would be cool to be able to do:

type Todo = Models.Document & {
    content: string;
    isComplete: boolean;
  }

Query.equal<Todo>("

and then have my IDE suggest:

image

Then, if I pass a string into the value, it would show an error/warning because it should be a boolean.

image

image

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@Suven-p
Copy link
Contributor

Suven-p commented May 5, 2023

@stnguyen90
Kind of hacky and not my code but check this out:
Typescript Playground

@Suven-p Suven-p linked a pull request May 9, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants