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: composables docs #211

Merged
merged 6 commits into from
Nov 7, 2023
Merged

feat: composables docs #211

merged 6 commits into from
Nov 7, 2023

Conversation

ksted
Copy link
Contributor

@ksted ksted commented Nov 2, 2023

Why:

Closes: AB#80041

Describe your changes

Adds a VitePress docs site for web app composables.

Open warnings:

[warning] CookieGroup, defined in ./cookie.config.ts, is referenced by UseCookieReturn.cookieJson but not included in the documentation.
[warning] useProductRecommended, defined in ./composables/useProductRecommended/types.ts, is referenced by useProductRecommended.useProductRecommended but not included in the documentation.
[warning] CookieGroupFromNuxtConfig, defined in ./cookie.config.ts, is referenced by useCookieBar.useCookieBar.initialCookieJsonFromConfig but not included in the documentation.

Open errors (when exporting types in apps/web/composables/useProductRecommended/index.ts:

composables/useProductRecommended/index.ts:2:1 - error TS2308: Module './useProductRecommended' has already exported a member named 'useProductRecommended'. Consider explicitly re-exporting to resolve the ambiguity.

2 export * from './types';

It's important to note that the resulting documentation only considers explicitly exported functions. This means internal functions are excluded. This is by design.:

As far as TypeDoc is concerned, this is not documentable code, there's no way to document these. You could technically write a plugin to do this, but eww.... even more eww than documenting not exported functions...

In my opinion, we should handle this by extending the documentation of the exported function and keeping the internal annotations as slim as possible. For example, I feel like all the individual @example blocks could be removed. I would like to handle those changes separately, though.

Checklist before requesting a review

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Nov 2, 2023
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Nov 2, 2023
@ksted ksted marked this pull request as ready for review November 2, 2023 12:45
@ksted ksted requested a review from a team as a code owner November 2, 2023 12:45
@maxiroellplenty maxiroellplenty merged commit 954ed67 into main Nov 7, 2023
6 checks passed
@maxiroellplenty maxiroellplenty deleted the feat/composables-docs branch November 7, 2023 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants