Write TSDoc to document frontend fields #4025
Labels
📄 aspect: text
Concerns the textual material in the repository
✨ goal: improvement
Improvement to an existing user-facing feature
🟨 priority: medium
Not blocking but should be addressed soon
🧱 stack: frontend
Related to the Nuxt frontend
⌨️ tech: typescript
Involves TypeScript
Milestone
Description
For fields with complications, or edge cases, or noteworthy details, write descriptions in the frontend interfaces that can be parsed by the documentation generation script from #4023.
Also document what the frontend expects from the API, what it wrangles and generates automatically.
Instructions
A quick primer about the media documentation pipeline for the frontend: the
just
recipefrontend/generate-docs
callspnpm
scriptdoc:media-props
which runsfrontend/scripts/document-media.js
. This JS script parsesfrontend/types/media.ts
and writes a Markdown file that's served by the docs.So to do this, you'll need to follow these steps.
just s
, let it run in the background.frontend/types/media.ts
./** */
for properties of the interfacesMedia
,ImageDetail
andAudioDetail
.@see
.id
andtitle
) as examples.just frontend/generate-docs media-props false
./meta/media_properties/frontend.html
to see your updates on the page.The text was updated successfully, but these errors were encountered: