You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppose I have a class like this (this is from my actual generated .d.ts but a bit simplified):
exportdefaultabstractclassSubscription</** @protected */T=any>{protected_handler: (obj: T)=>void;/** @protected */constructor(_handler: (obj: T)=>void);/** * Whether the subscription has been verified. */getverified(): boolean;/** * Activates the subscription. */start(): Promise<void>;/** * Suspends the subscription, not removing it from the listener. */suspend(): Promise<void>;/** * Deactivates the subscription and removes it from the listener. */stop(): Promise<void>;protectedabstracttransformData(response: object): T;}
The Subscription class uses the T type parameter internally, but not at all in its public API.
For consumers reading the documentation, it might be unnecessarily confusing to include it.
Suggested Solution
Expose the @protected (or @private) tag in the output somehow.
(This is coming from the Discord conversation we had a few days ago, just wanna formalize the suggestion here and provide an example)
The text was updated successfully, but these errors were encountered:
Have thought about this off and on for a while, and eventually determined that I'm not going to include this in TypeDoc proper. I want to focus on properly documenting what TypeScript sees as the export, which means limiting the scope of features that aim to modify the documentation away from that.
That said, this isn't too difficult to write a plugin that will do this for you:
Problem
Suppose I have a class like this (this is from my actual generated .d.ts but a bit simplified):
The Subscription class uses the T type parameter internally, but not at all in its public API.
For consumers reading the documentation, it might be unnecessarily confusing to include it.
Suggested Solution
Expose the
@protected
(or@private
) tag in the output somehow.(This is coming from the Discord conversation we had a few days ago, just wanna formalize the suggestion here and provide an example)
The text was updated successfully, but these errors were encountered: