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

Add TypeScript support #1950

Closed
3 tasks done
mtrezza opened this issue Jun 20, 2023 · 11 comments · Fixed by #1985
Closed
3 tasks done

Add TypeScript support #1950

mtrezza opened this issue Jun 20, 2023 · 11 comments · Fixed by #1985
Labels
bounty:$50 Bounty applies for fixing this issue (Parse Bounty Program) state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version type:feature New feature or improvement of existing feature

Comments

@mtrezza
Copy link
Member

mtrezza commented Jun 20, 2023

New Feature / Enhancement Checklist

Current Limitation

The code base does not have native TypeScript support but relies on 3rd part TypeScript definitions. These 3rd party definitions are often inconsistent, leading to complaints from developers and support cases being opened in Parse Platform resources, even though Parse Platform is not responsible for managing these definitions.

There have been discussions and attempts in the past about strategies, sometimes trying to use the existing (not 100% coherent) JSDoc annotation as a basis to transition to TypeScript. As usual, without a committed lead pushing the topic forward, such a large scale change becomes stale over time and don't get implemented.

Feature / Enhancement Description

Develop a strategy to gradually implement TypeScript support.

It would be beneficial to develop for a strategy where a TypeScript migration can be implemented gradually, in tiny PRs and over time. This makes the presence of a lead less relevant, as the efforts is split up into manageable tasks that be picked up by the community over time. That could mean that we won't take advantage of the existing JSDoc annotations, requiring more work in total, but that seems preferable compared to a large effort that never comes to fruition.

This issue closes with a strategy for gradual TypeScript implementation and a first, small PR that begins the implementation. We can then start to give out bounties for individual scopes to facilitate the migration to TypeScript in the long run.

@parse-github-assistant
Copy link

parse-github-assistant bot commented Jun 20, 2023

Thanks for opening this issue!

  • 🎉 We are excited about your ideas for improvement!

@mtrezza mtrezza pinned this issue Jun 20, 2023
@mtrezza mtrezza added the type:feature New feature or improvement of existing feature label Jun 20, 2023
@mtrezza
Copy link
Member Author

mtrezza commented Jun 20, 2023

cc @sadortun, @parse-community/js-sdk, @parse-community/server

@mtrezza
Copy link
Member Author

mtrezza commented Jun 23, 2023

@dblythy What's the strategy in #1954?

Shouldn't types be part of the code comment of the respective function rather than in a separate file? If the types are defined separately, they need to be maintained separately from the code itself or they'll deviate, same issue as we're having now with 3rd party types, right? Some of the DefinitelyTyped types are also incorrect.

Is there a way we can actually add types gradually to the code comments (replacing JSDoc) without requiring major PRs?

  • Could we just start with a file, change it to .ts and begin typing the functions properly by hand, i.e. moving from JSDoc to TS?
  • What would that mean for our API docs generation? Would that still work if we have mixed JSDoc and TS?

@mtrezza mtrezza added the bounty:$50 Bounty applies for fixing this issue (Parse Bounty Program) label Jun 29, 2023
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 4.2.0-alpha.5

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Aug 27, 2023
@dplewis
Copy link
Member

dplewis commented Aug 31, 2023

(Contributing instructions and progress tacking moved to #2012)

@mtrezza
Copy link
Member Author

mtrezza commented Sep 1, 2023

@dplewis This issue is closed, I suggest to move your comment to a new issue for better visibility; I'll be happy to pin it so hopefully others join in.

@dplewis
Copy link
Member

dplewis commented Sep 1, 2023

I’ll just leave it here since it’s already pinned, you can move it if you want to.

@mtrezza
Copy link
Member Author

mtrezza commented Sep 1, 2023

I'll move it, discussions on closed issues are generally discouraged due to low visibility.

@mtrezza mtrezza unpinned this issue Sep 1, 2023
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 4.3.0-beta.1

@parseplatformorg parseplatformorg added the state:released-beta Released as beta version label Sep 16, 2023
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 4.3.0-alpha.1

@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 4.3.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty:$50 Bounty applies for fixing this issue (Parse Bounty Program) state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version type:feature New feature or improvement of existing feature
Projects
None yet
3 participants