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
Add policy for undocumented public items #172
Comments
Why do you think they have to model 1:1? I've (and many others) have used this lib with three following the ethos of not including internal or private methods and haven't come up to any roadblocks before. As a side note, if we were to agree with this proposal, it's something I would expect the community to contribute to as the sheer number of files is unmanageable. |
I don't have a preference for whether internal properties and methods are included in the types or not, but if they are included, the |
@joshuaellis 1:1 for public items, including undocumented, and pseudo privates @donmccurdy what if we don't model them 1:1 ? ex. // blanket issue
class CssComposer extends EffectComposer {
constructor() {
super()
this._width = '1024px' // passes tsc but breaks effectcomposer's internal
I think we should first ask 3js when it will adopt private class fields. |
I would not recommend including private fields in the type declarations, regardless of whether they're pseudo-private or private class fields — the intention is the same. |
@donmccurdy The intention is the same, but the impl is totally different, pseudo privates suffer from this whereas private class fields don't. Hope the updated demo helps 🤪 |
@donmccurdy why typedoc (the tool)? do you mean tsdoc (the spec)? note that |
I do understand the technical differences between the two – still, my advice would be to omit private properties (of any type) and focus on the public API. The |
Great, so you understand that pseudo privates are techically public , right? the demo had examined that if their types are missing from three-ts-types, a derived class might blanket a pseudo private item in the base by accident, and screwup the base methods SLIENTLY. If missing types of public items are acceptable, doesn't it break the "Priorities and goals" of this project?
I agree that |
The comments above are just my opinion. You and the other contributors may of course make your own decision on this. 🙂 |
I agree with @donmccurdy, we're only going to expose the public facing api types, i've updated the readme to reflect this. |
Describe the feature you'd like:
Since types have to model 1:1, this will expose all items including the undocumented ones which are not supposed to be 'public', i suggest adding
@remarks
to those items:ex. Euler.d.ts
ex. mrdoob/three.js#23466
In case the items are removed from the src:
The text was updated successfully, but these errors were encountered: