Skip to content

[api]: some typescript types do not render properly #16

@bennypowers

Description

@bennypowers

Some complex types are not rendering properly

See for example https://github.com/atom-community/atom-ide-base/blob/1120181f51973a13bee8dd899a8accbc115182f8/types-packages/code-actions.d.ts#L38

This should render as something like

(diagnostic: Diagnostic, editor: Atom.TextEditor) => Promise<CodeAction[]>

Instead, our type renderer just throws its hands up and renders an empty string:

Screen Shot 2021-03-05 at 9 57 58

The relevant code lives in https://github.com/atom-community/atom-community.github.io/blob/master/docs/_includes/_joiningBlocks/_layoutApi/content/20-api.njk#L21

Part of the problem is that our input is TypeDoc reflection JSON, and we're trying to turn that back into TypeScript snippets. We haven't covered every case yet.

Relevant upstream PR: TypeStrong/typedoc#1216

This package, or code from it, may be of use: https://www.npmjs.com/package/typedoc-plugin-typescript-declaration

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