1.0.2 • Published 5 months ago

@r3ps4j/tstl-external-no-self v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

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.

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago