We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
8.0.0
20.0.0
latest
The function Model.count() is still valid in TypeScript even though the function does not exist.
Model.count()
interface Foo { bar: string[]; } const FooModel = model<Foo>('Foo', new Schema<Foo>({ bar: [String] })); await FooModel.count()
Results in TypeError: FooModel.count is not a function
TypeError: FooModel.count is not a function
Compilation error thrown by Typescript.
The text was updated successfully, but these errors were encountered:
types(model+query): correctly remove count from TypeScript types to r…
d350679
…eflect removal of runtime support Fix #14062
Merge pull request #14067 from Automattic/vkarpov15/gh-14062
b222362
types(model+query): correctly remove count from TypeScript types to reflect removal of runtime support
Successfully merging a pull request may close this issue.
Prerequisites
Mongoose version
8.0.0
Node.js version
20.0.0
MongoDB server version
latest
Typescript version (if applicable)
latest
Description
The function
Model.count()
is still valid in TypeScript even though the function does not exist.Steps to Reproduce
Results in
TypeError: FooModel.count is not a function
Expected Behavior
Compilation error thrown by Typescript.
The text was updated successfully, but these errors were encountered: