-
Notifications
You must be signed in to change notification settings - Fork 111
Closed
Description
Would be nice to have this feature - i.e. have something that marks classes, and/or aliases to have a restricted visibility. Other Lua files won't be able to see these types.
Why?
To reduce potential name collisions. Example: Imagine you got several dozens (43+) of "aura"-entry types. (In total I got ~120 ---@class annotations).
-- public API:
---@class AuraEntry : GenericEntry
---@field root_entry RootEntry
---@field updater? TimerEntry
---@field _stage_id? string|integer only for staged aura.
---@field [string] any
-- Some concrete type in some Lua file, one of the many:
---@class Weight2SpeedAuraEntry : AuraEntry -- Using structure from v3
---@field actual_weight number
---@field adapted_weight number
---@field uncommitted_gain number
-- Yet another type in Lua file, one of the many:
---@class ShaderFxAuraEntry : AuraEntry
---@field effect_shader Form
So, instead of cluttering global scope with all those very-local type names, is it possible to make it visible only in current Lua file?
---@class local.ShaderFxAuraEntry : AuraEntry
---@field effect_shader Form
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels