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

fix(NODE-3609): correct listDatabases return type #2986

Merged
merged 2 commits into from Sep 24, 2021

Conversation

nbbeeken
Copy link
Contributor

@nbbeeken nbbeeken commented Sep 20, 2021

I took a look at the other listX() methods, we have strong type information for listCollections() that switches based on the nameOnly option, I figured we don't need the strict typing here but I'm open to changing that. listIndexes() has no type information, it returns an unannotated cursor so .toArray() will return Promise<Document[]>, which at least the array of objects part is correct.

Copy link
Contributor

@dariakp dariakp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me and I agree with the reasoning for the rest, but can we add a TS test?

@dariakp dariakp marked this pull request as ready for review September 24, 2021 21:46
@dariakp dariakp merged commit a8e9938 into 4.1 Sep 24, 2021
@dariakp dariakp deleted the NODE-3609/listDatabasesTypes branch September 24, 2021 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants