-
Notifications
You must be signed in to change notification settings - Fork 128
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
[RFC] Typescript #516
Comments
Let's make it happen! |
Let's share (and vote on?) this RFC at the next global web chapter sync. I believe that most of the team is very much in favor of moving to TypeScript. @herberthenrique I see that you created a checklist of components. Do you plan to migrate each component individually? How do you plan to handle the initial configuration? Have you investigated if all of our tooling supports TypeScript (I'm thinking about Emotion, Storybook, Jest and Eslint/Prettier here)? |
@connor-baer I was planning we could create some spikes for the bootstrap and do it while I'm there at the São Paulo office next week |
@herberthenrique nice RFC 👍 💯 I've used some time on setting up the initial configuration, unfortunately didn't had time to finish it... As @connor-baer mentions above, the biggest challenge I've faced when doing this was integrating typescript's initial config with all the tooling already being used by circuit-ui... I probably will need some help from someone that knows the project better than I do... 🙂 |
@hleote That's exciting! Could you push your initial configuration to a branch please so we can use it as a starting point? |
We've effectively migrated most components to TypeScript. The few remaining components will be deprecated or rewritten from scratch. |
Suggested technology
- What technology do you suggest we start using?
Type System, TypeScript
- What problem does it solve?
Having type system inside Circuit UI we want to solve problems like:
Strict typing
Everything stays the way we define it. Need a variable to always be a number? It’ll always be a number, then.
Structural typing
Indispensable when you care about fully defining the actual structure you use. JavaScript allows for a lot of strange things to be done, so relying on a specific structure is a much safer solution.
Type annotations
A handy way of saying explicitly what type should be used.
Type inference
Implicit typing performed by TypeScript itself so that your developers don’t need to provide types where the compiler can find them on its own.
According to StackOverflow’s 2019 survey, TypeScript is currently one of the most loved programming languages, tied with Python:
Alternatives
What are the alternatives you've explored? Why choose one over the other?
We can use Flow for typing, but the community is not going on this direction and the library isn't been using in favor
Potential downsides
The biggest downside is related to the learning curves of new developers.
Learning type system if you only worked before with dynamic languages is kind of confusing.
Components to be migrated (WIP):
The text was updated successfully, but these errors were encountered: