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

Should private members marked by @private be included? #27

Open
diskdance opened this issue Aug 7, 2023 · 1 comment
Open

Should private members marked by @private be included? #27

diskdance opened this issue Aug 7, 2023 · 1 comment

Comments

@diskdance
Copy link
Contributor

diskdance commented Aug 7, 2023

TypeScript only supports private members in ES classes, so for @private (and @ignore) members in objects we can either include them in .d.ts with a warning, or not include them at all. I am (mostly) supportive of option 2, but it also has several problems:

  1. A public member's JSDoc may contains link to a private members
  2. For users TS throws an error that "this member does not exist" instead of "it is private"

I believe this is a design decision, so discussion is required. cc @AnYiEE

@diskdance
Copy link
Contributor Author

And should we distinguish between private classes like mw.Map and private members of objects?

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

No branches or pull requests

1 participant