-
-
Notifications
You must be signed in to change notification settings - Fork 205
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
Update typedoc to v0.22.15 #782
Conversation
TypeDoc has been updated to the latest version. This version supports later TypeScript versions, allowing us to update `tsc` in a later PR. It also includes improvements to document generation, most importantly in the case where parameters are destructured [1]. Versions v0.21.0 [2] and v0.22.0 [3] both included breaking changes, but none of them affect us. This new version included new console warnings that alerted me to a pre-existing problem that was introduced with v0.20.0, which is that many types are missing from our documentation. This is because TypeDoc will only include types that are exported from the package, and many of our internal types aren't exported from the package itself (even when they are exported from the module they're declared in). The plugin `typedoc-plugin-missing-exports` was added to address this. This plugin ensures that any types referenced in the docs are included in the docs, even if they aren't exported. [1]: TypeStrong/typedoc#1703 [2]: https://github.com/TypeStrong/typedoc/releases/tag/v0.21.0 [3]: https://github.com/TypeStrong/typedoc/releases/tag/v0.22.0
Since we are talking about updating |
Sorry I don't follow what you mean here. There is no worry about "supplying documentation for types that are not exported" - that's not what this plugin fixes. TypeDoc by default excludes any types that aren't exported. The problem is the opposite of that. It's that we use types in method signatures that aren't exported, so by default TypeDoc doesn't produce very useful documentation for those methods. The plugin ensures any types referenced also get included in the docs. This is a feature, not a bug. Are you suggesting that we should prevent these types from showing up in the documentation? How then would we ensure the documentation for our exported methods/fields/classes are comprehensive? |
Ah, I see. This plugin makes it so that if a function/whatever refers to a type and that type isn't being exported anywhere, then we should still include documentation about that type. That makes more sense. I am slightly worried that if people see a type in the documentation, they will think it is public and rely on it. I do see that in most cases, internal types are put under an Sorry for the confusion, this looks good to me. |
Hmm. The other option would be to actually export any type that was represented in the signature. I'm not sure this would be better though. For example, in cases where we define a type to make maintenance easier (e.g. to share a set of parameters between related methods), exporting the type would increase the package surface area and prevent "breaking" changes to that type that we'd otherwise be able to make without changing the method it's used by. I think this is a better solution for now. This lets us use types in places where it's convenient, without worrying about the impact of exposing those types. |
TypeDoc has been updated to the latest version. This version supports later TypeScript versions, allowing us to update `tsc` in a later PR. It also includes improvements to document generation, most importantly in the case where parameters are destructured [1]. Versions v0.21.0 [2] and v0.22.0 [3] both included breaking changes, but none of them affect us. This new version included new console warnings that alerted me to a pre-existing problem that was introduced with v0.20.0, which is that many types are missing from our documentation. This is because TypeDoc will only include types that are exported from the package, and many of our internal types aren't exported from the package itself (even when they are exported from the module they're declared in). The plugin `typedoc-plugin-missing-exports` was added to address this. This plugin ensures that any types referenced in the docs are included in the docs, even if they aren't exported. [1]: TypeStrong/typedoc#1703 [2]: https://github.com/TypeStrong/typedoc/releases/tag/v0.21.0 [3]: https://github.com/TypeStrong/typedoc/releases/tag/v0.22.0
TypeDoc has been updated to the latest version. This version supports later TypeScript versions, allowing us to update `tsc` in a later PR. It also includes improvements to document generation, most importantly in the case where parameters are destructured [1]. Versions v0.21.0 [2] and v0.22.0 [3] both included breaking changes, but none of them affect us. This new version included new console warnings that alerted me to a pre-existing problem that was introduced with v0.20.0, which is that many types are missing from our documentation. This is because TypeDoc will only include types that are exported from the package, and many of our internal types aren't exported from the package itself (even when they are exported from the module they're declared in). The plugin `typedoc-plugin-missing-exports` was added to address this. This plugin ensures that any types referenced in the docs are included in the docs, even if they aren't exported. [1]: TypeStrong/typedoc#1703 [2]: https://github.com/TypeStrong/typedoc/releases/tag/v0.21.0 [3]: https://github.com/TypeStrong/typedoc/releases/tag/v0.22.0
TypeDoc has been updated to the latest version. This version supports later TypeScript versions, allowing us to update
tsc
in a later PR. It also includes improvements to document generation, most importantly in the case where parameters are destructured.Versions v0.21.0 and v0.22.0 both included breaking changes, but none of them affect us.
This new version included new console warnings that alerted me to a pre-existing problem that was introduced with v0.20.0, which is that many types are missing from our documentation. This is because TypeDoc will only include types that are exported from the package, and many of our internal types aren't exported from the package itself (even when they are exported from the module they're declared in). The plugin
typedoc-plugin-missing-exports
was added to address this. This plugin ensures that any types referenced in the docs are included in the docs, even if they aren't exported.