Skip to content

Typescript Status #1005

Open
Open
@danez

Description

@danez

The overall development speed, as well as the frequency of new features and releases, has slowed down over the past few years. This is partly because I now have less time to dedicate to open source work. But more importantly, I believe the project has reached a critical turning point. Let me explain.

When this project started—before TypeScript was widely used—statically analyzing code to extract PropTypes was a reasonable solution. Most people used PropTypes in a fairly straightforward way, which made it easy for react-docgen to detect and interpret them. Even more complex use cases were manageable, because the underlying idea of PropTypes was relatively simple.

Fast forward to today: TypeScript has become the dominant way to type React props. react-docgen has some decent support for TypeScript—at least for the more common use cases. But TypeScript is a constantly evolving system, and it can be used in very sophisticated ways. This makes it increasingly difficult to cover all scenarios using static analysis alone.

While working on some of the more recent PRs, I realized that much of my time was spent effectively reimplementing how TypeScript works—trying to understand and reproduce its behavior just to infer component prop types. At that point, it started to feel like the project was heading in the wrong direction. I simply can’t keep up with the scale of what the TypeScript team and its much larger community are building.

There’s a project called react-docgen-typescript which I believe follows a more sustainable approach for TypeScript support. There may be even better options out there, but I don't currently have the time to invest in a shift of this magnitude.

So if you need better TypeScript support, I recommend giving react-docgen-typescript a try.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions