support for returning Env.Value

This commit is contained in:
Muki Kiboigo
2025-09-23 23:37:02 -07:00
parent c3ad054bb3
commit f03fcc9a31

View File

@@ -2889,6 +2889,10 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
return value.js_obj.toValue();
}
if (T == Value) {
return value.value;
}
if (T == Promise) {
// we're returning a v8.Promise
return value.promise.toObject().toValue();