Issue with useTransaction()
. Returning any after upgrading to AdonisJS V6
#21
Labels
bug
Something isn't working
After upgrading my application to AdonisJS V6, I've encountered an issue with the
useTransaction()
method's type definition. In version 5, calling this method preserved the instance type, enabling IntelliSense for subsequent method calls. However, in version 6,useTransaction()
returns a type ofany
, which disrupts IntelliSense and affects code clarity.Code Example:
Expected Behavior:
In AdonisJS V5,
useTransaction()
would return the specific type of the instance (e.g.,this
), allowing for continued IntelliSense support and type safety in chained method calls.Actual Behavior:
In AdonisJS V6,
useTransaction()
returnsany
, leading to a loss of IntelliSense and type safety for any subsequent chained method calls.Additional Information:
Navigating to the definition of
useTransaction()
takes me tomixin.d.ts
from SoftDeletes, unlike in V5, where it would lead to theLucidRow
interface definition in AdonisJS.Request:
Could the type definition for
useTransaction()
be adjusted to maintain the instance's type, as in V5, to support IntelliSense and enhance developer experience? Any guidance or workarounds would also be greatly appreciated.Repository:
I created this repository with the issue: https://github.com/GustavoSabel/issue-soft-deletes-adonisjsv6
The text was updated successfully, but these errors were encountered: