MCPcopy Create free account
hub / github.com/WiseLibs/better-sqlite3 / PrototypeMethod

Function PrototypeMethod

src/util/helpers.cpp:142–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140
141template <typename T, Napi::Value (*method)(const Napi::CallbackInfo&)>
142napi_property_descriptor PrototypeMethod(const char* name, Addon* addon) {
143 napi_property_descriptor desc = {};
144 desc.utf8name = name;
145 desc.method = TypeSafeCallback<T, method>;
146 desc.attributes = DEFAULT_ATTRIBUTES;
147 desc.data = addon;
148 return desc;
149}
150
151template <typename T, Napi::Value (*method)(const Napi::CallbackInfo&)>
152napi_property_descriptor PrototypeSymbolMethod(Napi::Symbol symbol, Addon* addon) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected