-
Notifications
You must be signed in to change notification settings - Fork 89
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
Use Typescript? #559
Comments
I'm not sure if it would be preferable -- this repo is mostly for people other than "ourselves" (i.e. the Cockpit development team), so it's hard for us to anticipate such preferences. But having a PoC available would certainly be great. I'm afraid none of us in the team currently have any experience with TS, so I can't judge about the learning curve, difficulties with integration into webpack, React, JSX, etc. |
That makes sense to me. I definitely prefer TS as I find it much easier and extremely helpful on larger projects (although this might not be awfully large, I still think it would be immensely helpful to have types), but I understand that might be down to personal preference. I added a simple PoC which should hopefully build just as it did before: #565 (Opened as a PR, I'm unsure of what the workflow looks like). |
As I said in cockpit-project/cockpit-ostree#338 , moving to .ts is fine in general, but it's a lot of work. If you or someone else is interested in working on this, this would be much appreciated! |
I am interested in working on this enhancement. As you said earlier there will be some learning curve for other developers who are not familiar with TypeScript but in the tsconfig.json file, if we enable allowJs then we can use javascript and typescript together. Also how to add a .ts annotation for the cockpit API for it to work and should I start working on the starter-kit repo to add TypeScript? |
@chandakanup just for the clarification, I would not consider the Typescript move a GSoC main project as it's not as much educative and quite a lot of repetitive work. I hope that's understandable. |
Alright, I understand now. I want to contribute to the cockpit project for GSoC 2023 but I am not able to understand codes and issues very well. @KKoukiou can you please guide me on how should I start contributing. |
Are there type declarations for
A good start can be found at: https://github.com/ALTinners/cockpit-typescript-react-boilerplate/blob/master/%40types/CockpitJS/index.d.ts (which is 6 years old now). |
Couldn't find anything regarding a possible implementation using Typescript instead of vanilla JavaScript, would that be preferable? Considering its large use as well as webpack handling it easy-peasy, I think it would probably not be difficult to integrate or create a separate repo specifically for Typescript.
I'd be happy to open up a PR with a poc.
The text was updated successfully, but these errors were encountered: