Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document imported types #516

Closed
Gozala opened this issue May 25, 2017 · 2 comments
Closed

Document imported types #516

Gozala opened this issue May 25, 2017 · 2 comments
Labels
enhancement Improved functionality

Comments

@Gozala
Copy link

Gozala commented May 25, 2017

Right now if I have code like this:

import {Maybe} from "maybe.ts"

export const toMaybe =
  <x, a>(result: Result<x, a>): Maybe<a> =>
    result.isOk ? result.value : null

export type Result<x, a> = ...

typedoc generates docs such that Maybe<a> is completely undocumented.

screen shot 2017-05-25 at 12 05 55 pm

It would be great to have an option to either generate docs for imports as well or alternatively have a way to provide external links.

@vekexasia
Copy link

👍 for this

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Nov 28, 2020

In 0.20, TypeDoc will document whatever you export. Changing the code to:

import {Maybe} from "maybe.ts"

export * as MaybeTS from "maybe.ts"

export const toMaybe =
  <x, a>(result: Result<x, a>): Maybe<a> =>
    result.isOk ? result.value : null
export type Result<x, a> = { isOk: true, value: a } | { isOk: false, err: x }

Will result in documentation like this, with links going where you would expect:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improved functionality
Projects
None yet
Development

No branches or pull requests

3 participants