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

Function PrototypeMethod

src/util/helpers.cpp:140–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected