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

Class Addon

napi.h:3394–3408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3392#if NAPI_VERSION > 5
3393template <typename T>
3394class Addon : public InstanceWrap<T> {
3395 public:
3396 static inline Object Init(Env env, Object exports);
3397 static T* Unwrap(Object wrapper);
3398
3399 protected:
3400 using AddonProp = ClassPropertyDescriptor<T>;
3401 void DefineAddon(Object exports,
3402 const std::initializer_list<AddonProp>& props);
3403 Napi::Object DefineProperties(Object object,
3404 const std::initializer_list<AddonProp>& props);
3405
3406 private:
3407 Object entry_point_;
3408};
3409#endif // NAPI_VERSION > 5
3410
3411#ifdef NAPI_CPP_CUSTOM_NAMESPACE

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected