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

Function PrototypeSymbolMethod

src/util/helpers.cpp:152–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150
151template <typename T, Napi::Value (*method)(const Napi::CallbackInfo&)>
152napi_property_descriptor PrototypeSymbolMethod(Napi::Symbol symbol, Addon* addon) {
153 napi_property_descriptor desc = {};
154 desc.name = symbol;
155 desc.method = TypeSafeCallback<T, method>;
156 desc.attributes = DEFAULT_ATTRIBUTES;
157 desc.data = addon;
158 return desc;
159}
160
161// Defines a getter as an own property of the given object. V8 exposed these
162// getters as native data properties on each instance, which made them visible

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected