Skip to content

module translate error #123

@imfox

Description

@imfox
module g {
    export function test() { }
}
g.test();

to

require("typescript_lualib")
g = g or {}
do
    local function test()
    end
    exports.g.test = test
    g.test = test
end
g.test()

result

C:\Program Files (x86)\Lua\5.1\lua.exe: .\a.lua:8: attempt to index global 'exports' (a nil value)
stack traceback:
        .\a.lua:8: in main chunk
        [C]: ?

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