Update annotations P.1

This commit is contained in:
Insality
2024-10-29 20:31:45 +02:00
parent a46f38734e
commit c85d66fdca
40 changed files with 1458 additions and 3941 deletions

View File

@@ -1,21 +1,16 @@
local component = require("druid.component")
---@class component_name : druid.base_component
local Component = component.create("component_name")
local M = component.create("component_name")
-- Component constructor. Template name and nodes are optional. Pass it if you use it in your component
function Component:init(template, nodes)
self.druid = self:get_druid(template, nodes)
self.root = self:get_node("root")
function M:init(template, nodes)
self.druid = self:get_druid(template, nodes)
self.root = self:get_node("root")
self.button = self.druid:new_button("button", function() end)
self.button = self.druid:new_button("button", function() end)
end
-- [OPTIONAL] Call on component remove or on druid:final
function Component:on_remove()
end
return Component
return M