Vincit / objection.js

An SQL-friendly ORM for Node.js
https://vincit.github.io/objection.js
MIT License
7.26k stars 636 forks source link

Result type pass-through errors in typings #742

Closed jtlapp closed 6 years ago

jtlapp commented 6 years ago

Hey @mceachen. Sami suggested that I open a new issue for this, though it's a continuation of the sorts of problems in #717. Boy did I learn a lot studying your typings!

I'm sharing from my fork before making any PRs:

I made the following sorts of changes to the typings, going from memory:

The following remains to be done. I've given them a preliminary look and have questions about both. It would be helpful to collaborate.

I really had a hard time improving on what you've already done. The only significant change I could come up with was finding a way to make Sami's suggestion work, although I ended up doing something slightly different (QueryBuilder<QM, RM, RV> vs QueryBuilder<QM, SingleModel, ArrayModel>).

Thanks you for you continued patience with me!

mceachen commented 6 years ago

Resolved by #753