-
Notifications
You must be signed in to change notification settings - Fork 976
docs(ai): Document enum values in top-level JSDoc comments #9271
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
base: main
Are you sure you want to change the base?
Conversation
|
Size Report 1Affected ProductsNo changes between base commit (ccbf7ba) and merge commit (8057046).Test Logs |
Size Analysis Report 1Affected ProductsNo changes between base commit (ccbf7ba) and merge commit (8057046).Test Logs |
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.
Unless I'm misunderstanding, removing the comments above the type unions actually does remove strings from devsite. There's two sections in devsite docs, Variables and Type Aliases, and the consts go under Variables and the string unions go under Type Aliases. That's not great but not really changeable without messing with api-documenter. They both have the same anchor name so if you click on one in the table of contents, you'll only go to the first one (under Variables), but the other one also exists and people could run into it by scrolling, or the short description in the table of contents.
This fixes an issue with the documentation on DevSite, where enum values' JSDoc strings aren't extracted by our API documenter tool. For example, the
ImagenPersonFilterLevel
docs don't contain docs for each enum value, despite those explanations being in the source code here.I removed all documentation from the type union declarations (

type x = (typeof x..
), because 1) they're not used by API documenter so they aren't in devsite, 2) VSCode type hints inherit the docs of the type union from the object:(here we're hovering the definition of a
HarmCategory
type union, and we see the docs for theHarmCategory
object)