File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -878,6 +878,8 @@ bool v8__Value__IsFunction(const v8::Value& self) { return self.IsFunction(); }
878878
879879bool v8__Value__IsAsyncFunction (const v8::Value& self) { return self.IsAsyncFunction (); }
880880
881+ bool v8__Value__IsPromise (const v8::Value& self) { return self.IsPromise (); }
882+
881883bool v8__Value__IsBoolean (const v8::Value& self) { return self.IsBoolean (); }
882884
883885bool v8__Value__IsBooleanObject (const v8::Value& self) { return self.IsBooleanObject (); }
Original file line number Diff line number Diff line change @@ -477,6 +477,7 @@ void v8__Value__NumberValue(
477477 MaybeF64 * out );
478478bool v8__Value__IsFunction (const Value * self );
479479bool v8__Value__IsAsyncFunction (const Value * self );
480+ bool v8__Value__IsPromise (const Value * self );
480481bool v8__Value__IsBoolean (const Value * self );
481482bool v8__Value__IsBooleanObject (const Value * self );
482483bool v8__Value__IsInt32 (const Value * self );
Original file line number Diff line number Diff line change @@ -949,6 +949,13 @@ pub fn Persistent(comptime T: type) type {
949949 };
950950 }
951951
952+ /// Should only be called if you know the underlying type is a v8.Module.
953+ pub fn castToModule (self : Self ) Module {
954+ return .{
955+ .handle = @as (* const c .Module , @ptrCast (self .handle )),
956+ };
957+ }
958+
952959 /// Should only be called if you know the underlying type is a v8.PromiseResolver.
953960 pub fn castToPromiseResolver (self : Self ) PromiseResolver {
954961 return .{
@@ -2126,6 +2133,10 @@ pub const Value = struct {
21262133 return c .v8__Value__IsAsyncFunction (self .handle );
21272134 }
21282135
2136+ pub fn isPromise (self : Self ) bool {
2137+ return c .v8__Value__IsPromise (self .handle );
2138+ }
2139+
21292140 pub fn isArray (self : Self ) bool {
21302141 return c .v8__Value__IsArray (self .handle );
21312142 }
You can’t perform that action at this time.
0 commit comments