We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Define a promise type with the return value type of function as the payload.
function
Example:
const std = @import("std"); const zigar = @import("zigar"); fn hello() anyerror!i32 { return 1234; } comptime { std.debug.assert(zigar.function.PromiseOf(hello) == zigar.function.Promise(anyerror!i32)); }
Arguments:
anytype
Return value:
Promise(T)
Promise(T) | PromiseArgOf(function)
There was an error while loading. Please reload this page.