MCPcopy Create free account
hub / github.com/nodejs/node-addon-api / TestAddon

Method TestAddon

test/addon.cc:9–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7class TestAddon : public Napi::Addon<TestAddon> {
8 public:
9 inline TestAddon(Napi::Env env, Napi::Object exports) {
10 DefineAddon(
11 exports,
12 {InstanceMethod("increment", &TestAddon::Increment),
13 InstanceValue(
14 "subObject",
15 DefineProperties(
16 Napi::Object::New(env),
17 {InstanceMethod("decrement", &TestAddon::Decrement)}))});
18 }
19
20 ~TestAddon() { fprintf(stderr, "TestAddon::~TestAddon\n"); }
21

Callers

nothing calls this directly

Calls 1

DefinePropertiesFunction · 0.50

Tested by

no test coverage detected