Annotations changes: clarification of types, addition of missing annotations

This commit is contained in:
Van
2025-10-03 20:50:14 +03:00
parent ab92e372f3
commit 69b8c6469c
13 changed files with 129 additions and 84 deletions

View File

@@ -6,7 +6,7 @@ local VisualEnum = Core.Item.require('Item.VisualEnum')
local Node = Core.Item:getModClassExtended({})
---@param nodeDef Node.NodeDefinition
---@return Node
---@return Node
function Node:new(nodeDef)
nodeDef.settings.visual = VisualEnum.ITEM_3D
@@ -20,7 +20,7 @@ end
---default parameters that will be added to the node's parameters
---when an instance is received.
---@param defaultDef Node.NodeDefinition
---@return Node
---@return Node
function Node:getExtended(defaultDef)
---@type Node
local ChildClass = Mod:getClassExtended(self, {
@@ -32,7 +32,7 @@ end
---Returns an instance of the `ItemFactory` class that can be used to mass-register identical items.
---@param defaultDef? Node.NodeDefinition
---@return ItemFactory
---@return ItemFactory
function Node:getFactory(defaultDef)
if defaultDef == nil then
defaultDef = self.defaultDef

View File

@@ -1,6 +1,8 @@
---@type Item.Callbacks
local ItemCallbacks = Core.Item.require('Item.Callbacks')
-- TODO: Разобраться с дубликатами аннотаций полей. Приоритетно брать аннотации из util/ide-helper
---@class Node.Callbacks : Item.Callbacks
local Callbacks = Mod:getClassExtended(ItemCallbacks, {})

View File

@@ -1,6 +1,8 @@
---@type Item.Settings
local ItemSettings = Core.Item.require('Item.Settings')
-- TODO: Разобраться с дубликатами аннотаций полей. Приоритетно брать аннотации из util/ide-helper
---@class Node.Settings : Item.Settings
local Settings = Mod:getClassExtended(ItemSettings, {})