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

Function PrototypeSymbolMethod

src/util/helpers.cpp:150–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148
149template <typename T, Napi::Value (*method)(const Napi::CallbackInfo&)>
150napi_property_descriptor PrototypeSymbolMethod(Napi::Symbol symbol, Addon* addon) {
151 napi_property_descriptor desc = {};
152 desc.name = symbol;
153 desc.method = TypeSafeCallback<T, method>;
154 desc.attributes = DEFAULT_ATTRIBUTES;
155 desc.data = addon;
156 return desc;
157}
158
159// Defines a getter as an own property of the given object. V8 exposed these
160// 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