fix: Resolve TypeScript errors
Signed-off-by: Hermes Agent <hermes@nosuchhost>
This commit is contained in:
9
client/node_modules/napi-macros/example/binding.gyp
generated
vendored
Normal file
9
client/node_modules/napi-macros/example/binding.gyp
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"targets": [{
|
||||
"target_name": "napi_macros_example",
|
||||
"include_dirs": [
|
||||
"<!(node -e \"require('../')\")"
|
||||
],
|
||||
"sources": [ "./index.c" ]
|
||||
}]
|
||||
}
|
||||
3
client/node_modules/napi-macros/example/example.js
generated
vendored
Normal file
3
client/node_modules/napi-macros/example/example.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
var bindings = require('node-gyp-build')(__dirname)
|
||||
|
||||
console.log(bindings.times_two(42))
|
||||
15
client/node_modules/napi-macros/example/index.c
generated
vendored
Normal file
15
client/node_modules/napi-macros/example/index.c
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <node_api.h>
|
||||
#include <napi-macros.h>
|
||||
|
||||
NAPI_METHOD(times_two) {
|
||||
NAPI_ARGV(1)
|
||||
NAPI_ARGV_INT32(number, 0)
|
||||
|
||||
number *= 2;
|
||||
|
||||
NAPI_RETURN_INT32(number)
|
||||
}
|
||||
|
||||
NAPI_INIT() {
|
||||
NAPI_EXPORT_FUNCTION(times_two)
|
||||
}
|
||||
11
client/node_modules/napi-macros/example/package.json
generated
vendored
Normal file
11
client/node_modules/napi-macros/example/package.json
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "napi-macros-example",
|
||||
"version": "0.0.0",
|
||||
"description": "an example using napi-macros",
|
||||
"dependencies": {
|
||||
"node-gyp-build": "^3.2.2"
|
||||
},
|
||||
"scripts": {
|
||||
"install": "node-gyp-build"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user