Skip to content

Mixing typeof and parameters named type #188

@gakada

Description

@gakada

typeof is translated to type, if there is parameter named type it is not renamed. For example

const f = (type: number | ((x: number) => number)): number => (typeof type === 'number' ? type : type(42))

gives

local f = function(type) return (__TS__Ternary((type(type) == "table" and "object" or type(type))=="number", function() return type end, function() return type(42) end)) end

which won't work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions