-
-
Notifications
You must be signed in to change notification settings - Fork 391
Open
Labels
enhancementNew feature or requestNew feature or request
Description
When using some c api's (In my case Factorio's modding api) when you retrieve a value you get one type, but you can set it with multiple different types.
---@class Surface
---@class Player
local Player = {}
---@fieldread surface Surface
---@fieldwrite surface Surface|string
local p = Player.surface --- p is Surface
p.surface = "Other Surface" --No warningsAnother thought I had was attribute types, which would more easily support more attributes in the future
---@field{read} surface Surface
---@field{write} surface Surface|string
---@field{read,write} surface -- the default if no attributes are suppliedfiras-assaad, VariableVixen, justarandomgeek, haruomaki, raiguard and 5 more
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request