Skip to content

How to disable 'undefined-field' diagnostic for a class? #2245

@ArmoredPony

Description

@ArmoredPony

Lua allows to implement __index metamethod in such way that basically every call to table's field would be valid. If it does not exist, __index will handle it without raising an error. However 'Undefined field ...' message will still appear. I can disable it on the line, in the file, or in the workspace, but is there a way to somehow tell the language server that for this class any field name is valid?

Metadata

Metadata

Assignees

No one assigned

    Labels

    feat/LuaCats AnnotationsRelated to Lua Language Server Annotations (LuaCats)feat/type checkRelated to the type checking featurequestionUser has a question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions