You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the .root(cx) method is provided by the object trait Object. This is because Node-API requires the value be an Object.
However, this is an overly restrictive requirement in Node-API and may be relaxed in the future to allow non-Object types (e.g., string).
If we want to support root for non-object types in the future, we will want to move the method. However, moving is a breaking change. Duplicating it is also a breaking change because users may end up with an ambiguous call if both traits are in scope.
I propose moving the function to the Value trait with a T: Object bound. We can relax this bound in the future without a breaking change.
Currently the
.root(cx)
method is provided by the object traitObject
. This is because Node-API requires the value be anObject
.However, this is an overly restrictive requirement in Node-API and may be relaxed in the future to allow non-Object types (e.g.,
string
).If we want to support
root
for non-object types in the future, we will want to move the method. However, moving is a breaking change. Duplicating it is also a breaking change because users may end up with an ambiguous call if both traits are in scope.I propose moving the function to the
Value
trait with aT: Object
bound. We can relax this bound in the future without a breaking change.The text was updated successfully, but these errors were encountered: