From 6ba06da7f7b0ae3cdf26ab84439ce30fd4af351b Mon Sep 17 00:00:00 2001 From: ffrostfall Date: Wed, 23 Apr 2025 17:05:12 -0400 Subject: [PATCH] Initial commit --- docs/luaurc-definition-files.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 docs/luaurc-definition-files.md diff --git a/docs/luaurc-definition-files.md b/docs/luaurc-definition-files.md new file mode 100644 index 0000000..136a45d --- /dev/null +++ b/docs/luaurc-definition-files.md @@ -0,0 +1,21 @@ +# Definition Files in .luaurc Configs + +## Summary + +Implement a field in the `.luaurc` configuration file named "definitionFiles", which accepts an array of paths to ".d.luau" files (aka, declaration files). These definition files would be passed into the typechecker for any luau file under that configuration. + +## Motivation + +As cross-runtime code becomes increasingly common, the model which language servers use today (pass definition files into the API) is proving to not scale. Projects with multiple runtime targets suffer from bad editor experience, and great difficulty in getting types to be correct. + +## Design + +This is the bulk of the proposal. Explain the design in enough detail for somebody familiar with the language to understand, and include examples of how the feature is used. + +## Drawbacks + +This brings declaration files to be in a much more user-facing spot, when definition files are not meant to be user-facing. + +## Alternatives + +What other designs have been considered? What is the impact of not doing this?