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

Get rid of the altv-enums module #15

Open
xxshady opened this issue Jan 11, 2023 · 1 comment
Open

Get rid of the altv-enums module #15

xxshady opened this issue Jan 11, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@xxshady
Copy link
Owner

xxshady commented Jan 11, 2023

Improve altvEnums feature by adding ability (it will be a separate option enhancedAltvEnums for backward compatibility) to use enums directly from alt-* modules, as with default typescript compiler (tsc):

- import { RadioStation } from 'altv-enums'
+ import { RadioStation } from 'alt-server'

To allow such code i will add transpilation of enums to js from your own local node_modules/@altv/types-* on initial build of code
(types-server, types-client, types-shared)

@xxshady xxshady added the enhancement New feature or request label Jan 11, 2023
@xxshady
Copy link
Owner Author

xxshady commented Feb 20, 2023

One problem which I don't know (or should I?) how to solve is when user updates altv-types regardless of re-running esbuild watch build script, this can cause runtime errors because enums will only be transpiled on initial build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant