atom-community / atom-community/atom-community.github.io

[api]: some typescript types do not render properly

Open
#16 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
27
Forks
7
PR merge metrics
No merged PRs in 30d

Description

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
```ts
(diagnostic: Diagnostic, editor: Atom.TextEditor) => Promise
```

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: https://github.com/TypeStrong/typedoc/pull/1216

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.