@r3ps4j/tstl-external-no-self
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

TSTL External No Self

npm

Plugin for TypeScriptToLua which allows you to put the @noSelfInFile in external libraries.

Installation

  1. Install the package from npm:

    npm i -D @r3ps4j/tstl-external-no-self
  2. Add the plugin to your tsconfig.json:

    {
        "tstl": {
            "luaPlugins": [
                {
                    "name": "@r3ps4j/tstl-external-no-self"
                }
            ]
        }
    }
  3. Define which libraries (or files) to add @noSelfInFile to:

    {
        "tstl": {
            "luaPlugins": [
                {
                    "name": "@r3ps4j/tstl-external-no-self",
                    "targets": [
                        "@somescope/somelibrary", // Works
                        "somelibrary/file.d.ts" // Also works
                    ]
                }
            ]
        }
    }

Credits

Credits go to Perry van Wesel, most of the code from this package comes from his comment within issue #1489 on TypeScriptToLua's repository. I only added the logic for specifying libraries.

Contributing

Pull requests are much appreciated! If you think you can improve this package, please open a pull request and I will look at it as soon as possible.

Readme

Keywords

Package Sidebar

Install

npm i @r3ps4j/tstl-external-no-self

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

5.89 kB

Total Files

4

Last publish

Collaborators

  • r3ps4j