diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2026-10-17 10:13:13 +0200 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2026-10-17 10:13:13 +0200 |
| commit | b1b4df39abb41a4ae71733e2d139dc70cc71acd8 (patch) | |
| tree | 3d72b1dd75841e0b950282099ec9c837aa03d869 /src/zilch/Object.zig | |
| parent | dd24e86dad0402917b1713d1afeefaf65c3d1e51 (diff) | |
zilch: implement callable and promise
Diffstat (limited to 'src/zilch/Object.zig')
| -rw-r--r-- | src/zilch/Object.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/zilch/Object.zig b/src/zilch/Object.zig index 194c43b..b37f40b 100644 --- a/src/zilch/Object.zig +++ b/src/zilch/Object.zig @@ -11,11 +11,11 @@ pub inline fn get(self: *Self, env: *Env, key: anytype) AnyFuture { return env.call(bindings.get, .{ self, key }); } -pub inline fn set(self: *Self, env: *Env, key: anytype, value: anytype) Future(.undefined) { +pub inline fn set(self: *Self, env: *Env, key: anytype, value: anytype) Future(void) { return .fromAny(env.call(bindings.set, .{ self, key, value })); } -pub inline fn delete(self: *Self, env: *Env, key: anytype) Future(.undefined) { +pub inline fn delete(self: *Self, env: *Env, key: anytype) Future(void) { return .fromAny(env.call(bindings.delete, .{ self, key })); } @@ -23,11 +23,11 @@ pub inline fn call(self: *Self, env: *Env, method: []const u8, args: anytype) An return env.call(bindings.call, .{ self, method } ++ args); } -pub inline fn free(self: *Self, env: *Env) Future(.undefined) { +pub inline fn free(self: *Self, env: *Env) Future(void) { return .fromAny(env.call(bindings.free, .{self})); } -pub fn new(self: *Self, env: *Env) Future(.object) { +pub inline fn new(self: *Self, env: *Env) Future(*Self) { return .fromAny(env.call(bindings.new, .{self})); } |