CFunction wraps a raw C function pointer as a callable TypeScript function.
Example
Syntax
Parameters
Callback Type Arguments
When an argument type isFFIType.callback ('k'), the JSCallback instance is automatically unwrapped to its .ptr:
Obtaining Pointers
Useffi.getSymbolPtr(handle, name):
Async Version: AsyncCFunction
AsyncCFunction has the same signature as CFunction but returns Promise<number>, executing on a background thread without blocking the main thread.