Skip to content

type narrowing with alias #373

Closed
Closed
@lewis6991

Description

@lewis6991
Image
--- @alias myalias string|string[]

--- @param x myalias
function foo(x)
  if type(x) == 'string' then
    return
  elseif type(x) == 'table' then
    for _, t in ipairs(x) do
    end
  end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions