typechecked optargs constructors for nodes

This commit is contained in:
Alexander Courtis
2024-11-06 15:53:39 +11:00
parent 359398db05
commit ac302ae16a
12 changed files with 136 additions and 121 deletions

View File

@@ -5,4 +5,17 @@ local Object = require("nvim-tree.classic")
---@field protected fs_stat_target uv.fs_stat.result
local LinkNode = Object:extend()
---@class (exact) LinkNodeArgs: NodeArgs
---@field link_to string
---@field fs_stat_target uv.fs_stat.result
---
---@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
return LinkNode