X Tutup
Skip to content

@noSelf doesn't work on function declarations #853

@DoctorGester

Description

@DoctorGester

Source

/** @noSelf */
declare function dog(snoop: string);

declare namespace foo {
    /** @noSelf */
    function bar();
}

foo.bar();
dog("");

Transpiles to

foo:bar()
dog(_G, "")

Expected

foo.bar()
dog("")

Playground link: https://typescripttolua.github.io/play/#code/PQKhAIAEDsHsGUCmAbAZuEwBQATRBjZAQwCdFxUBXafAFwEtZpwdYBzACgGc5YAHAFzgutEvWhsAlAG4suAsTLhoRALaIufIvnKpYscAG8s4U+FAQYCFOkwmzVGgybgARqQ4ysAXzl7YAHTuJJ6yrJwARBEyQA

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

      X Tutup