#include "napi.h" typedef struct TSLanguage TSLanguage; extern "C" TSLanguage *tree_sitter___DSL_NAME__(); // "tree_sitter___DSL_NAME___binding" is the symbol that gets exported // when this file is compiled as a Node.js addon. Napi::Object Init(Napi::Env env, Napi::Object exports) { exports["name"] = Napi::String::New(env, "__DSL_NAME__"); auto language = tree_sitter___DSL_NAME__(); exports["language"] = Napi::External::New(env, language); return exports; } NODE_API_MODULE(tree_sitter___DSL_NAME___binding, Init)