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

feat(docs): Hide internal methods from API docs #2945

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

teogeb
Copy link
Contributor

@teogeb teogeb commented Dec 12, 2024

Added @hidden TypeDoc annotation for internal methods:

  • getNode()
  • getConfig()

This way these methods are not included in the API docs. The internal StreamrClient#getOperator() was already annotated like this.

Removed redundant @internal annotations from the NetworkNodeStub as it is not used by any publicly available method anymore:

  • also modified NetworkNodeFacade#getNode() to return Promise<Omit<NetworkNodeStub, 'start' | 'stop'>> as a consequence of removing the @internal annotations
  • also removed unnecessary @internal annotation from NetworkNodeFacade#setProxies()

Note

It would be possible annotate those method with @internal. But then the methods wouldn't be included to the generated .d.ts files (as we use "stripInternal": true in tsconfig.node.json). The type definitions are needed by node and cli-tools packages which use these internal methods.

@@ -748,6 +749,7 @@ export class StreamrClient {

/**
* @deprecated This in an internal method
* @hidden
*/
getConfig(): StrictStreamrClientConfig {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a good reason we've made this internal? I think it could be useful in practice to see the config that is in use?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can make it public in a follow-up pr if needed. Earlier discussion: #1859 (comment)

@teogeb teogeb merged commit 2553d56 into main Dec 13, 2024
24 checks passed
@teogeb teogeb deleted the sdk-hide-internal-methods-from-api-docs branch December 13, 2024 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants