objection-softdelete icon indicating copy to clipboard operation
objection-softdelete copied to clipboard

add a TS typings for query builder

Open capaj opened this issue 6 years ago • 1 comments

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.

capaj avatar Jan 12 '19 13:01 capaj

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!

ackerdev avatar Mar 11 '21 19:03 ackerdev