Skip to content

[Feature Request] Add a strong typed struct/class that cannot assign a new field that is not defined in the struct/class. #1990

Open
@eminor1988

Description

@eminor1988
  • Example:
---@struct Student
---@field study_level integer

---@type Student
local new_student = {
    study_level = 0,
    tobacco_level = 1, -- This should be error.
}
  • Usage:
    We can do refactoring easier when rename the fields with this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions