You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
---@classSurface---@classPlayerlocalPlayer= {}
---@fieldread surfaceSurface---@fieldwrite surfaceSurface|stringlocalp=Player.surface--- p is Surfacep.surface="Other Surface" --No warnings
Another 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 supplied
firas-assaad, VariableVixen, justarandomgeek, haruomaki, raiguard and 5 more