Skip to content

Result of table.pack is of a union instead of an intersection type #1016

@Vftdan

Description

@Vftdan

Currently, the type-checker complains about index accesses of a table.pack result inside condition branches that check that field n is not nil.


should be instead:

---@return [T...] & { n: integer }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions