TS method overloads need to be re-ordered #11726
Labels
status: wip
For issues and PRs. Applied when the PR is not ready yet / when work to close the issue has started.
type: typescript
For issues and PRs. Things that involve typescript, such as typings and intellisense.
Issue Description
The method overloading order is incorrect for a number of Model methods. This results in the wrong method signature being returned.
What are you doing?
I'm passing a
NonNullFindOptions
object intoModel.findOne
.Here is the link to the SSCCE for this issue: TS Playground
What do you expect to happen?
I expect to get a
Promise<Model>
back.What is actually happening?
I get a
Promise<Model | null>
instead.Additional context
The TS handbook outlines that
Environment
Issue Template Checklist
How does this problem relate to dialects?
Would you be willing to resolve this issue by submitting a Pull Request?
The text was updated successfully, but these errors were encountered: