fix: correct misleading JSDoc about stubs auto-application

renderWithDefaults only merges plugins and directives, not stubs.
Updated doc to accurately describe behavior.

Addresses review feedback:
https://github.com/Comfy-Org/ComfyUI_frontend/pull/10628#discussion_r3004203297
This commit is contained in:
bymyself
2026-04-06 17:53:38 -07:00
parent f6aa48ecc6
commit 46cb9fdcfb

View File

@@ -42,10 +42,11 @@ const defaultDirectiveStubs: Record<string, () => void> = {
*
* Use via `global.stubs` in render options:
* ```ts
* render(MyComponent, { global: { stubs: { Button: stubs.Button } } })
* render(MyComponent, { global: { stubs: { Skeleton: stubs.Skeleton } } })
* ```
*
* Or use `renderWithDefaults` which auto-applies these as defaults.
* Or use `renderWithDefaults` which provides plugins and directives.
* Import `stubs` and pass them via `global.stubs` when needed.
*/
const SkeletonStub = defineComponent({
name: 'Skeleton',