types-mediawiki icon indicating copy to clipboard operation
types-mediawiki copied to clipboard

Should private members marked by @private be included?

Open diskdance opened this issue 1 year ago • 1 comments

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 avatar Aug 07 '23 04:08 diskdance

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

diskdance avatar Aug 07 '23 14:08 diskdance