BabylonJS / BabylonJS/JsRuntimeHost

Implement Object::Delete for Node-API-JSI

Open Beginner friendly
#234 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
22
Forks
23
Avg merge
3d 14h
Merged PRs (30d)
6

Description

[Filed by Copilot on behalf of @bghgary]

**Describe the bug**

Node-API-JSI’s `Napi::Object::Delete` overloads throw `std::runtime_error("TODO")` instead of deleting the requested property. [The implementation is currently stubbed](https://github.com/BabylonJS/JsRuntimeHost/blob/main/Core/Node-API-JSI/Include/napi/napi-inl.h).

**To Reproduce**

```cpp
auto object = Napi::Object::New(env);
object.Set("value", 1);
object.Delete("value");
```

The final call throws `"TODO"`.

**Expected behavior**

`Object::Delete` should delete the property and return the result without throwing.

**Screenshots**

N/A

**Other**

- Platform: Windows x64 with the JSI backend.

Contributor guide

Open the contributing guide

Research direction

Start in Core/Node-API-JSI/Include/napi/napi-inl.h and locate the Napi::Object::Delete overloads that currently throw std::runtime_error("TODO"). Reproduce the issue with the provided object.Set("value", 1) and object.Delete("value") example. Done means the property is deleted, the result is returned, and the call no longer throws.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
84/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.