Make codegen only generate one output file #79
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Due to the AST changes merged in #76, the code generation for TypeScript now fills in the asset ID into the declaration file's type. I think that it makes most sense to, from this point forward, only generate one file.
I've went ahead and removed the
typescript
[codegen]
option in the config, and replaced it withlanguage
, valid values of which are currentlyluau
(default) andtypescript
. I probably didn't need to do this, but it gives us more flexibility to support more languages in the future, should users want them... even if it is unlikely.The generated TypeScript's file's extension is now
.ts
instead of.d.ts
, and it exports a variable with the assets, rather than a type.This is a breaking change. TypeScript users will need to update their configuration with a one-line change, and they will want to delete the
.luau
file, as it would be stale going forward. They might also need to update their linter and/or formatter ignore files, if applicable.