-
-
Notifications
You must be signed in to change notification settings - Fork 386
Open
Labels
questionUser has a questionUser has a question
Description
I have some ffi that looks like this
---@type ffilib
Connector.ffi = package.preload["ffi"]()
Connector.ffi.cdef [[
void curl_free_pointer(const char* string);
const char* curl_get(const char* query);
const char* curl_patch(const char* query, const char* body, bool return_patched);
const char* curl_post(const char* query, const char* body, bool merge_duplicates, bool ignore_duplicates, bool return_post);
]]
I am able to get nice typing on the Connector.ffi part through ---@type ffilib, but am not sure if there is a nice way to annotate the returns from these functions. A could wrap the c functions to lua functions and then annotate the lua functions, but I wasn't sure if there was a nice way to do it directly.
Metadata
Metadata
Assignees
Labels
questionUser has a questionUser has a question