@@ -269,9 +269,19 @@ class NodeApiJsiRuntime : public jsi::Runtime {
269269 override ;
270270 jsi::Value getProperty (const jsi::Object &obj, const jsi::String &name)
271271 override ;
272+
273+ #if JSI_VERSION >= 21
274+ jsi::Value getProperty (const jsi::Object &obj, const jsi::Value &name) override ;
275+ #endif
276+
272277 bool hasProperty (const jsi::Object &obj, const jsi::PropNameID &name)
273278 override ;
274279 bool hasProperty (const jsi::Object &obj, const jsi::String &name) override ;
280+
281+ #if JSI_VERSION >= 21
282+ bool hasProperty (const jsi::Object &obj, const jsi::Value &name) override ;
283+ #endif
284+
275285 void setPropertyValue (
276286 JSI_CONST_10 jsi::Object &obj,
277287 const jsi::PropNameID &name,
@@ -281,6 +291,19 @@ class NodeApiJsiRuntime : public jsi::Runtime {
281291 const jsi::String &name,
282292 const jsi::Value &value) override ;
283293
294+ #if JSI_VERSION >= 21
295+ void setPropertyValue (
296+ const jsi::Object &obj,
297+ const jsi::Value &name,
298+ const jsi::Value &value) override ;
299+
300+ void deleteProperty (const jsi::Object &obj, const jsi::PropNameID &name)
301+ override ;
302+ void deleteProperty (const jsi::Object &obj, const jsi::String &name) override ;
303+
304+ void deleteProperty (const jsi::Object &obj, const jsi::Value &name) override ;
305+ #endif
306+
284307 bool isArray (const jsi::Object &obj) const override ;
285308 bool isArrayBuffer (const jsi::Object &obj) const override ;
286309 bool isFunction (const jsi::Object &obj) const override ;
@@ -921,6 +944,7 @@ class NodeApiJsiRuntime : public jsi::Runtime {
921944 napi_value getProperty (napi_value object, napi_value propertyId) const ;
922945 void setProperty (napi_value object, napi_value propertyId, napi_value value)
923946 const ;
947+ void deleteProperty (napi_value object, napi_value propertyId) const ;
924948 void setProperty (
925949 napi_value object,
926950 napi_value propertyId,
@@ -1741,6 +1765,15 @@ jsi::Value NodeApiJsiRuntime::getProperty(
17411765 return toJsiValue (getProperty (getNodeApiValue (obj), getNodeApiValue (name)));
17421766}
17431767
1768+ #if JSI_VERSION >= 21
1769+ jsi::Value NodeApiJsiRuntime::getProperty (
1770+ const jsi::Object &obj,
1771+ const jsi::Value &name) {
1772+ NodeApiScope scope{*this };
1773+ return toJsiValue (getProperty (getNodeApiValue (obj), getNodeApiValue (name)));
1774+ }
1775+ #endif
1776+
17441777bool NodeApiJsiRuntime::hasProperty (
17451778 const jsi::Object &obj,
17461779 const jsi::PropNameID &name) {
@@ -1755,6 +1788,15 @@ bool NodeApiJsiRuntime::hasProperty(
17551788 return hasProperty (getNodeApiValue (obj), getNodeApiValue (name));
17561789}
17571790
1791+ #if JSI_VERSION >= 21
1792+ bool NodeApiJsiRuntime::hasProperty (
1793+ const jsi::Object& obj,
1794+ const jsi::Value& name) {
1795+ NodeApiScope scope{*this };
1796+ return hasProperty (getNodeApiValue (obj), getNodeApiValue (name));
1797+ }
1798+ #endif
1799+
17581800void NodeApiJsiRuntime::setPropertyValue (
17591801 JSI_CONST_10 jsi::Object &obj,
17601802 const jsi::PropNameID &name,
@@ -1773,6 +1815,38 @@ void NodeApiJsiRuntime::setPropertyValue(
17731815 getNodeApiValue (obj), getNodeApiValue (name), getNodeApiValue (value));
17741816}
17751817
1818+ #if JSI_VERSION >= 21
1819+ void NodeApiJsiRuntime::setPropertyValue (
1820+ const jsi::Object& obj,
1821+ const jsi::Value& name,
1822+ const jsi::Value& value) {
1823+ NodeApiScope scope{*this };
1824+ setProperty (
1825+ getNodeApiValue (obj), getNodeApiValue (name), getNodeApiValue (value));
1826+ }
1827+
1828+ void NodeApiJsiRuntime::deleteProperty (
1829+ const jsi::Object &obj,
1830+ const jsi::PropNameID &name) {
1831+ NodeApiScope scope{*this };
1832+ deleteProperty (getNodeApiValue (obj), getNodeApiValue (name));
1833+ }
1834+
1835+ void NodeApiJsiRuntime::deleteProperty (
1836+ const jsi::Object& obj,
1837+ const jsi::String& name) {
1838+ NodeApiScope scope{*this };
1839+ deleteProperty (getNodeApiValue (obj), getNodeApiValue (name));
1840+ }
1841+
1842+ void NodeApiJsiRuntime::deleteProperty (
1843+ const jsi::Object &obj,
1844+ const jsi::Value &name) {
1845+ NodeApiScope scope{*this };
1846+ deleteProperty (getNodeApiValue (obj), getNodeApiValue (name));
1847+ }
1848+ #endif
1849+
17761850bool NodeApiJsiRuntime::isArray (const jsi::Object &obj) const {
17771851 NodeApiScope scope{*this };
17781852 return isArray (getNodeApiValue (obj));
@@ -2862,6 +2936,14 @@ void NodeApiJsiRuntime::setProperty(
28622936 CHECK_NAPI (jsrApi_->napi_set_property (env_, object, propertyId, value));
28632937}
28642938
2939+ // Deletes object property value.
2940+ void NodeApiJsiRuntime::deleteProperty (
2941+ napi_value object,
2942+ napi_value propertyId) const {
2943+ bool result{};
2944+ CHECK_NAPI (jsrApi_->napi_delete_property (env_, object, propertyId,&result));
2945+ }
2946+
28652947// Sets object property value with the provided property accessibility
28662948// attributes.
28672949void NodeApiJsiRuntime::setProperty (
0 commit comments