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
Using Typescript, .orFail() should return a promise that cannot resolve to null. Currently it is not the case:
.orFail()
const foo = await FooModel.findById(id).orFail() return foo.bar // Error TS2531: Object is possibly 'null'.
Expected behavior: foo should not be typed as nullable when orFail is used.
The text was updated successfully, but these errors were encountered:
Please open up an issue with your typescript bindings, we don't have any officially supported bindings. Follow #8108 for updates.
Sorry, something went wrong.
No branches or pull requests
Using Typescript,
.orFail()
should return a promise that cannot resolve to null. Currently it is not the case:Expected behavior: foo should not be typed as nullable when orFail is used.
The text was updated successfully, but these errors were encountered: