Skip to content

Proposal: Use typescript types to fill in API docs #2111

@flotwig

Description

@flotwig

We could use the typescript docs from the cypress repo to potentially autofill some of our API docs for us.

typedoc can generate machine-readable and HTML documentation from our .ts files.

Things that would have to be figured out:

  • How does docs release work? How is this versioned against cypress repo?
    • Deploy docs after latest types are available on cypress master branch?
  • What level of docs could be replaced by this?
    • Probably shouldn't put our entire API docs in Typescript
    • Would be nice to pull call signatures, property descriptions, default values
    • Could also pull examples from the docs - @example tags
    • Could add partials to existing .md docs: {% call-signatures "cy.request" %}, {% properties "Cypress.RequestOptions" %}
  • Should we host typedoc's HTML output and link to it whenever types are mentioned in the docs?

I have typedoc generating type info and some basic tags here: #2112

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions