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

Typescript to JSDoc #646

Open
shinokada opened this issue Apr 5, 2023 · 0 comments
Open

Typescript to JSDoc #646

shinokada opened this issue Apr 5, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@shinokada
Copy link
Collaborator

shinokada commented Apr 5, 2023

Summary

Please watch this video.
Svelte 3 is in Typescripts and Svelte 4 will be in JSDoc.

Motivation

  • Language agnostic: JSDoc is simply a way of writing documentation and type annotations in JavaScript-like languages, making it more versatile. You can use it in various contexts where TypeScript might not be as suitable. I have to edit my code on REPL.

  • Easy integration: Since JSDoc is just a comment-based system, you don’t need to change your code or tooling. You can start adding JSDoc comments to your existing JavaScript codebase without much hassle.

  • Lower learning curve: JSDoc is pretty straightforward and easier to learn compared to TypeScript, which might require developers to learn new syntax and type concepts.

  • Documentation benefits: JSDoc offers a consistent way to write documentation for your code. This makes it easier for other developers to understand your codebase and helps in generating documentation pages.

  • Gradual adoption: You can add JSDoc incrementally to your codebase, allowing you to gradually introduce type checking and documentation to your project without having to fully commit to TypeScript.

  • No build step required: JSDoc doesn’t require a build step like TypeScript does for type checking and transpiring. This might be an advantage if you prefer a simpler development process.

Please note that TypeScript has its own advantages, such as more robust type checking, better IDE support, and more advanced features.

If we change to JSDoc, we need to consider how to generate props.json and change the their presentation.

@shinokada shinokada added the enhancement New feature or request label Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant