-
Notifications
You must be signed in to change notification settings - Fork 6.8k
docs: show exported functions #12736
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
docs: show exported functions #12736
Conversation
* Changes the Dgeni setup to properly display exported functions (e.g. from cdk/coercion, cdk/a11y, cdk/platform)
src/cdk/table/can-stick.ts
Outdated
@@ -32,6 +32,7 @@ export interface CanStick { | |||
} | |||
|
|||
/** | |||
* @docs-private |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we put the @docs-private
after the description everywhere else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, thought about creating a rule that enforces this now. Do you think it would be worth having a rule that enforces this?
@@ -33,23 +36,24 @@ export function normalizeMethodParameters(method: NormalizedMethodMemberDoc) { | |||
parameterName = parameterName.replace('?', ''); | |||
} | |||
|
|||
if (!method.params) { | |||
method.params = []; | |||
if (!doc.params) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: you can shorten this to doc.params = doc.params || []
.
@@ -103,6 +107,8 @@ export class ComponentGrouper implements Processor { | |||
group.additionalInterfaces.push(doc); | |||
} else if (doc.docType === 'type-alias') { | |||
group.additionalTypeAliases.push(doc); | |||
} else if (doc.docType === 'function') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole else if
chain is getting pretty long. Consider using a switch on the doc.docType
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer keeping it like this. Since this is most likely the last docType
and all the breaks
don't make the code less or more readable IMO.
@@ -79,6 +79,20 @@ <h3 id="additional_interfaces" class="docs-header-link docs-api-h3"> | |||
{% endfor %} | |||
{%- endif -%} | |||
|
|||
{%- if doc.additionalFunctions.length -%} | |||
<h3 id="additional_functions" class="docs-header-link docs-api-h3"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be separated with a dash, rather than an underscore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think so. I've just made it consistent with the other header links.
</h3> | ||
{% for item in doc.additionalFunctions %} | ||
{# | ||
Since the function docs are having a similar structure as method docs, we use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are having -> have
@crisbeto Done. Addressed most of your comments. |
Is there anything aside from functions in |
@jelbourn Yeah, the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Introduces a new option that allows developers to configure the `tsHost` to not concatenate multiple leading comments for a `TypeScript` node content. The `tsHost` is a newly created service that delegates (for now) to the `tsParser` package for retrieving the content of a given node. The advantage of the `tsHost` is that people can inject the `tsHost` in Dgeni `.config()` and specify options or overwrite methods. Related angular/components#12736.
Introduces a new option that allows developers to configure the `tsHost` to not concatenate multiple leading comments for a `TypeScript` node content. The `tsHost` is a newly created service that delegates (for now) to the `tsParser` package for retrieving the content of a given node. The advantage of the `tsHost` is that people can inject the `tsHost` in Dgeni `.config()` and specify options or overwrite methods. Related angular/components#12736.
Introduces a new option that allows developers to configure the `tsHost` to not concatenate multiple leading comments for a `TypeScript` node content. The `tsHost` is a newly created service that delegates (for now) to the `tsParser` package for retrieving the content of a given node. The advantage of the `tsHost` is that people can inject the `tsHost` in Dgeni `.config()` and specify options or overwrite methods. Related angular/components#12736.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
NOTE: A few descriptions for the coercion won't show up for now. See related fix for Dgeni-packages:
angular/dgeni-packages#270