Skip to content

Conversation

@Perryvw
Copy link
Member

@Perryvw Perryvw commented Sep 14, 2021

Regarding #1101 and #1118

It could happen that someone is importing lua sources that internally require some environment-provided library. It would then be impossible to mark these as @NoResolution in .d.ts files. Therefore I have added a noResolvePaths option (I'm open for other names) to our tsconfig that act as a global list of lua require paths.

For example tsconfig.json:

{
    "compilerOptions": {
        // ....
    },
    "tstl": {
        "noResolvePaths": ["foo.bar", "baz"]
    }
}

Will cause the following requires to not throw a resolution error. They will also not be rewritten:

require("foo.bar")
require("baz")

Currently this IS case-sensitive.

@Perryvw Perryvw requested review from lolleko and tomblind September 14, 2021 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants