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

@@ -1,9 +1,9 @@
local Object = require("nvim-tree.classic")
local Class = require("nvim-tree.classic")
---@class (exact) LinkNode: Object
---@class (exact) LinkNode: Class
---@field link_to string
---@field protected fs_stat_target uv.fs_stat.result
local LinkNode = Object:extend()
local LinkNode = Class:extend()
---@class (exact) LinkNodeArgs: NodeArgs
---@field link_to string
@@ -12,8 +12,6 @@ local LinkNode = Object:extend()
---@protected
---@param args LinkNodeArgs
function LinkNode:new(args)
LinkNode.super.new(self, args)
self.link_to = args.link_to
self.fs_stat_target = args.fs_stat_target
end