Skip to content

Support namespace-like variables? #1789

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

Closed
srmagura opened this issue Nov 11, 2021 · 1 comment
Closed

Support namespace-like variables? #1789

srmagura opened this issue Nov 11, 2021 · 1 comment
Labels
wontfix Declining to implement

Comments

@srmagura
Copy link
Contributor

Search Terms

Namespace, not included in the documentation

Problem

The code

type Email = (value: string) => boolean;

export type Validators = {
  email: Email;
};

produces the warning

Warning: Email, defined at src/index.ts:12, is referenced by Validators.__type.email but not included in the documentation.

and the documentation

image

Suggested Solution

In my case, I want TypeDoc to treat the above code as

export type Validators = {
  email: (value: string) => boolean;
};

When TypeDoc sees that the unexported type Email is going to be referenced in the documentation, it could "replace" Email with (value: string) => boolean. But what if it was an accident that the Email type wasn't exported, and now we've erased it from the documentation? 🤔

Additional Context

This was discussed on #1739, see my comment and those that follow.

I have no idea if this is a common problem. This seems like a low priority issue to me.

@Gerrit0 Gerrit0 added the wontfix Declining to implement label Feb 19, 2022
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Feb 19, 2022

I didn't realize this the first time I read this since "namespace-like variables" meant something different to me, this is something you could do with a plugin but is not something I want to include in TypeDoc proper. #1823.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix Declining to implement
Projects
None yet
Development

No branches or pull requests

2 participants