diff --git a/ReactCommon/cxxreact/Value.h b/ReactCommon/cxxreact/Value.h index c43a523a7fc..1aa965e9c31 100644 --- a/ReactCommon/cxxreact/Value.h +++ b/ReactCommon/cxxreact/Value.h @@ -191,6 +191,11 @@ public: } } + template + ReturnType* getPrivate() const { + return static_cast(JSObjectGetPrivate(m_obj)); + } + JSContextRef context() const { return m_context; } @@ -223,6 +228,10 @@ public: return m_value; } + JSType getType() const { + return JSValueGetType(m_context, m_value); + } + bool isBoolean() const { return JSValueIsBoolean(context(), m_value); }