luau-lsp icon indicating copy to clipboard operation
luau-lsp copied to clipboard

Enum can't be indexed as a table

Open TheHackerPuppy opened this issue 2 years ago • 0 comments

Problem I can't index Enum like this:

Enum["UserInputType"]["Keyboard"]

Error TypeError: Expected type table, got 't1 where t1 = {| AccessoryType: Enum.AccessoryType, ActionType: Enum.ActionType, ActuatorRelativeTo: Enum.ActuatorRelativeTo, ActuatorType: Enum.ActuatorType, AdPortalStatus: Enum.AdPortalStatus, AdPortalType: Enum.AdPortalType, AdShape: Enum.AdShape, AdornCullingMode: Enum.AdornCullingMode, AlignType: Enum.AlignType, AlphaMode: Enum.AlphaMode, AnalyticsEconomyAction: Enum.AnalyticsEconomyAction, AnalyticsLogLevel: Enum.AnalyticsLogLevel, AnalyticsProgressionStatus: Enum.AnalyticsProgressionStatus, AnimationPriority... TRUNCATED' instead

TheHackerPuppy avatar Oct 22 '22 21:10 TheHackerPuppy