Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make codegen only generate one output file #79

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jackTabsCode
Copy link
Owner

@jackTabsCode jackTabsCode commented Jul 30, 2024

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 with language, valid values of which are currently luau (default) and typescript. 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.

@jackTabsCode jackTabsCode added this to the v0.9.0 milestone Jul 30, 2024
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.

1 participant