Skip to content

Property 'deleteTasks' does not exist on type 'MeiliSearch'.ts(2339) #1929

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

Open
anaibol opened this issue Apr 25, 2025 · 5 comments · May be fixed by #1866
Open

Property 'deleteTasks' does not exist on type 'MeiliSearch'.ts(2339) #1929

anaibol opened this issue Apr 25, 2025 · 5 comments · May be fixed by #1866
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@anaibol
Copy link

anaibol commented Apr 25, 2025

After upgrading meilisearch from 0.49.0 to 0.50.0 I get
Property 'deleteTasks' does not exist on type 'MeiliSearch'.ts(2339)

My previously working code was
await meilisearchClient .deleteTasks({ types: [...Object.values(TaskTypes)], }) .catch(() => {})

@anaibol
Copy link
Author

anaibol commented Apr 25, 2025

It's an issue on the docs:
client.deleteTasks
->
client.taks.deleteTasks

@flevi29
Copy link
Collaborator

flevi29 commented Apr 25, 2025

TaskTypes is no longer an object, it's only a type. But if you want to delete all task types, you're better off not specifying any, if I'm not mistaken.
Try deleteTasks({}).

@flevi29 flevi29 added the needs investigation Needs to take time to understand the issue. label Apr 25, 2025
@anaibol
Copy link
Author

anaibol commented Apr 25, 2025

TaskTypes is no longer an object, it's only a type. But if you want to delete all task types, you're better off not specifying any, if I'm not mistaken. Try deleteTasks({}).

previously i needed to put all the tasks types there. maybe that changed

@flevi29
Copy link
Collaborator

flevi29 commented Apr 25, 2025

You could also specify * for all task types, but currently the types don't accept that. I will eventually take a better look at it.

@flevi29 flevi29 added invalid PR/Issue considered as invalid documentation Improvements or additions to documentation and removed needs investigation Needs to take time to understand the issue. invalid PR/Issue considered as invalid labels Apr 26, 2025
@flevi29
Copy link
Collaborator

flevi29 commented May 2, 2025

It's an issue on the docs:
client.deleteTasks
->
client.taks.deleteTasks

You are right, README.md wasn't properly updated regarding recent changes. @anaibol You should instead read the docs from here: https://meilisearch.github.io/meilisearch-js/

@flevi29 flevi29 linked a pull request May 2, 2025 that will close this issue
3 tasks
@flevi29 flevi29 linked a pull request May 8, 2025 that will close this issue
3 tasks
@Strift Strift self-assigned this May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants