typechecked optargs constructors for watcher and event

This commit is contained in:
Alexander Courtis
2024-11-06 16:36:14 +11:00
parent ac302ae16a
commit a7db5b29a4
11 changed files with 91 additions and 65 deletions

View File

@@ -83,8 +83,12 @@ function M.create_watcher(node)
end
M.uid = M.uid + 1
return Watcher:create(path, nil, callback, {
context = "explorer:watch:" .. path .. ":" .. M.uid,
return Watcher:create({
path = path,
callback = callback,
data = {
context = "explorer:watch:" .. path .. ":" .. M.uid
}
})
end