Skip to content

nodiscard for certain returned variables #3123

@oeshennix

Description

@oeshennix

Functions that return multiple variables may have variables that are important or not. There should be a way to flag any return value as nodiscard.

---@return number index
---@return {number:string} list
---@nodiscardall
---@return number nonimportantvariable
function getREALLYImportantList()

I suppose nodiscardall that marks any return above it to be important.
Maybe even @nodiscardabove would workout

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