-
Notifications
You must be signed in to change notification settings - Fork 7
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
Refactor to TypeScript #81
Comments
I think this would be really nice. However, it would probably mean we refactor everything to use modern React (17-18) patterns like hooks and lazy imports. Quite a big investment time-wise since we are at a pretty stable point in Bananas as of now. A complete refactor would surely introduce a lot of bugs. A slightly less time demanding option would be to have all new features be written in TypeScript. We would probably need to update/modify our Webpack setup for it to handle .ts/tsx files but that would probably be pretty quick and easy. The quickest option to make Bananas more TS-friendly would be to make a PR to https://github.com/DefinitelyTyped/DefinitelyTyped and have them publish @types/django-bananas.js to npm. The typings of everything that Bananas exposes would in that case be accessible for anyone using TS through that package. The downside is of course that the code base itself wouldn't be TS at all 👎 |
As @hbystrom91 suggested I have made some very loose typings in DefinitelyTyped/DefinitelyTyped#60784 for DefinatelyTyped which is waiting for review currently.... |
This issue is partly solved now by the Ideally I would like to refactor everything and gradually move over to typescript fully (especially re-write the |
No description provided.
The text was updated successfully, but these errors were encountered: