Need advice about which tool to choose?Ask the StackShare community!


+ 1

+ 1
Add tool
Decisions about jsdoc and TypeScript
Vladyslav Holubiev
Software Enginieer at Shelf | 3 upvotes 路 18.5K views

As our codebase grew in size, we were looking for ways to improve code quality. We chose TypeScript over Flow due to its rapid industry adoption and overall tools support.

We noticed how different open-source projects were migrating from Flow to TypeScript. Most notably, it was Jest, even though Jest and Flow were both developed by Facebook. See this HN thread if you want to dive into an interesting discussion around this move.

Additionally, at the beginning of 2019, both Babel and ESLint enabled seamless TypeScript support, which allowed easy migration path in a backward-compatible way.

See more
Oleksandr Fedotov
Senior Software Engineer at joyn | 4 upvotes 路 18.3K views

Initially making a decision to use Flow vs Typescript we decided to go with flow as we wanted our code to run in a way we wrote it, because when using Flow types are simply removed from the code without modifying the code itself. Sadly, the type system of Flow was in some cases very hard to understand and declare the types correctly, especially in cases when the structure is very dynamic (e.g. object keys and values are created dynamically). Another reason was bad integration with IDE and frequent crashes which made DX very poor. Therefore, we made another evaluation of Typescript and decided to move towards it. As our code base was pretty big when we decided to migrate to TS we couldn't just stop and re-write everything, that's why we started writing new modules in Typescript as well as transforming old components. To make that possible we had to configure Webpack loader to support simultaneous bundling of Flow&JS and Typescript. After around 2 months of the transformation we have around 40% of code being written in Typescript and we are more than happy with integration TS has with IDE, as well as ease of declaring types for dynamic modules and functions.

See more
Pros of jsdoc
Pros of TypeScript
    Be the first to leave a pro
    • 159
      More intuitive and type safe javascript
    • 95
      Type safe
    • 72
      JavaScript superset
    • 46
      The best AltJS ever
    • 27
      Best AltJS for BackEnd
    • 12
      Powerful type system, including generics & JS features
    • 9
      Nice and seamless hybrid of static and dynamic typing
    • 9
      Aligned with ES development for compatibility
    • 8
      Compile time errors
    • 6
      Structural, rather than nominal, subtyping
    • 4
    • 3
      Starts and ends with JavaScript

    Sign up to add or upvote prosMake informed product decisions

    Cons of jsdoc
    Cons of TypeScript
      Be the first to leave a con
      • 3
        Code may look heavy and confusing

      Sign up to add or upvote consMake informed product decisions

      - No public GitHub repository available -

      What is jsdoc?

      JSDoc 3 is an API documentation generator for JavaScript, similar to JavaDoc or PHPDoc. You add documentation comments directly to your source code, right along side the code itself. The JSDoc Tool will scan your source code, and generate a complete HTML documentation website for you.

      What is TypeScript?

      TypeScript is a language for application-scale JavaScript development. It's a typed superset of JavaScript that compiles to plain JavaScript.

      Need advice about which tool to choose?Ask the StackShare community!

      What companies use jsdoc?
      What companies use TypeScript?

      Sign up to get full access to all the companiesMake informed product decisions

      What tools integrate with jsdoc?
      What tools integrate with TypeScript?
        No integrations found

        Sign up to get full access to all the tool integrationsMake informed product decisions

        Blog Posts

        What are some alternatives to jsdoc and TypeScript?
        It obtains a comment called doc comment from a source code. Then it generates a document from a tag in a doc comment
        Flow is an online collaboration platform that makes it easy for people to create, organize, discuss, and accomplish tasks with anyone, anytime, anywhere. By merging a sleek, intuitive interface with powerful functionality, we're out to revolutionize the way the world's productive teams get things done.
        It is the only complete API development environment, used by nearly five million developers and more than 100,000 companies worldwide.
        Swagger UI
        Swagger UI is a dependency-free collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation and sandbox from a Swagger-compliant API
        It takes more than a simple HTML page to thrill your API users. The right tools take weeks of development. Weeks that saves.
        See all alternatives
        Interest over time
        News about jsdoc
        More news