-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
[Proposal] Make able to write React in Typescript #16210
Conversation
78f08f8
to
0ae37fa
Compare
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
d2b202e
to
7aadcf0
Compare
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hope to know the attitude of the official, so we can decide whether to continue pushing on this migration |
By the way, I think we can also drop the outdated Redux and so on. In stead of rewrite the v3 front end in TypeScript, it may be a better choice for us to refactory the whole fornt end in new tech stack and move into mastodon v4 |
This pull request has merge conflicts that must be resolved before it can be merged. |
7aadcf0
to
c7d3392
Compare
This pull request has resolved merge conflicts and is ready for review. |
c7d3392
to
80f6200
Compare
@Gargron rebased now! Can I open this PR? |
80f6200
to
df4141d
Compare
This pull request has merge conflicts that must be resolved before it can be merged. |
df4141d
to
6c47a74
Compare
This pull request has resolved merge conflicts and is ready for review. |
great job! |
Ready for merge? |
This pull request has merge conflicts that must be resolved before it can be merged. |
Where is big G 🫣 |
ef059e6
to
a9c009c
Compare
This pull request has resolved merge conflicts and is ready for review. |
Co-authored-by: berlysia <berlysia@gmail.com>
a9c009c
to
1fe1961
Compare
I am sorry for taking an outrageously long time to merge this, and I thank you for the persistence. |
Running Interestingly, the build error is different on my machine and in the job to build the Docker image. On my machine, it chokes on the TypeScript
For the docker image build job, it fails with:
Unfortunately, I'm not knowledgeable enough in webpack and babel to figure out what is going on exactly. EDITED: This has been addressed in #24374 |
- Babel plugins need not to be dev deps, as the docker image only install non-dev dependencies and builds the assets - Somehow Webpack does not support the `??` ES2020 syntax, so we need to transpile it. This is not ideal and can occur on other modern syntax used in TS code, but this fixes the issue for now - We are using Webpack 4, not 5, the types definition is updated accordingly
Co-authored-by: berlysia <berlysia@gmail.com> Co-authored-by: fusagiko / takayamaki <takayamaki@users.noreply.github.com>
fix #6267
Mastodon has grow to very large class based React written in JavaScript now.
It's very hard for me to understand.
Newcomers will be even more so.
3 years after #6267, it seems that the mainstream of AltJS has become Typescript.
Many of the npm libraries provide own types definitions.
Most of the others are covered by third-party type definitions.
I think better to use Typescript now.
// I understand that Gargron wants prefer to delay large-scale PR merging by some reason.
// I made this PR to prevent duplicate work.