Skip to content

Investigate alternative libraries for type generation than jsdoc #7298

@Bertie690

Description

@Bertie690

Moving away

It has come to my attention that the jsdoc CLI that the tsgen parser relies on has more or less died off given its commit history has effectively stopped.
With the only activity being dependency version bumps, it appears there is little hope of the project adding support for things like tuples or negative numbers, both of which serve as major limitations towards documenting Phaser's own API. (For instance, we physically cannot type RandomDataGenerator#sign with the 2 values it is contractually obligated to return as jsdoc will crash when trying to parse the union -1 | 1).

Unless a major revival is launched in the near future (which it likely won't be), it may be wise to start thinking of alternate means of generating type documentation long-term. (I'd strongly advise against an in-house solution as the current one is ALREADY incomprehensible as is.)

I have created this issue as a "discussion board" of sorts to discuss various options for moving towards a more functional (and ideally better-maintained) solution for typegen that doesn't curb expressivity.

Note

If the repository is ever converted to pure TypeScript OR plain JavaScript (by which I mean actual ESM classes and not "fake" class-building functions), tsc would likely be the best means of generate types for us.

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