-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
fix: vite client types #7877
fix: vite client types #7877
Conversation
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.
I checked WebAssembly
, Worker
, SharedWorker
type exists in dom
and webworker
.
https://github.com/microsoft/TypeScript/blob/main/lib/lib.dom.d.ts
https://github.com/microsoft/TypeScript/blob/main/lib/lib.webworker.d.ts
Also I think this approach makes sense.
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.
This looks like a good solution to me too. I think we could merge in Vite 3 to not accidentally break existing project typechecking.
Should we add a note in the docs about how to let users add dom / webworker in tsconfig.json to determine env? |
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Description
fix: #3905
Additional context
I remove the
/// <reference lib="dom" />
, it can run. I think we can remove it. Let users add dom / webworker intsconfig.json
to determine env. And the create-vite is also define{"lib": ["dom"]}
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).