objection-softdelete
objection-softdelete copied to clipboard
add a TS typings for query builder
When I have soft delete enabled models with typescript, I have to do this:
type SoftDeleteQueryBuilder = QueryBuilder<PathwayModelAsEditor> & {
includeDeleted: () => void
}
to be able to call includeDeleted
on the query builder.
It would be nice if this package had it's own typings for query builder so we wouldn't have to extend the objection one inline in our own models.
That is quite awkward!
Unfortunately, I'm not working in this space any longer, and only have a very cursory knowledge of TypeScript, so I honestly don't know what needs to be done here.
If you'd like to submit a PR I'd be more than happy to give it a review and publish a fix when I can!