Skip to content

docs: fix buildApp type mismatch in code example#20798

Merged
hi-ogawa merged 1 commit into
vitejs:mainfrom
serhalp:patch-1
Sep 19, 2025
Merged

docs: fix buildApp type mismatch in code example#20798
hi-ogawa merged 1 commit into
vitejs:mainfrom
serhalp:patch-1

Conversation

@serhalp

@serhalp serhalp commented Sep 18, 2025

Copy link
Copy Markdown
Contributor

Description

buildApp returns Promise<void> | undefined, so using this example as is results in a type error

`buildApp` returns `Promise<void> | undefined`, so using this example as is results in a type error

@hi-ogawa hi-ogawa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Btw, buildApp doesn't even allow returning undefined, but I wonder we should loosen it since I've always got a type error momentarily when IDE auto completing buildApp() {}.

@hi-ogawa hi-ogawa changed the title fix(docs): fix type mismatch in code example docs: fix type mismatch in code example Sep 19, 2025
@hi-ogawa hi-ogawa changed the title docs: fix type mismatch in code example docs: fix buildApp type mismatch in code example Sep 19, 2025
@hi-ogawa hi-ogawa merged commit c095037 into vitejs:main Sep 19, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants