Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/vite/tsconfig.check.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"target": "ES2020",
"moduleResolution": "node16",
"module": "Node16",
"lib": ["ES2020", "WebWorker"], // ES2020 is very conservative check for client types, could be bumped if needed
"lib": ["ES2020"], // ES2020 is very conservative check for client types, could be bumped if needed
"types": [], // Avoid checking unrelated node_modules types
"noEmit": true,
"strict": true,
Expand Down
10 changes: 10 additions & 0 deletions packages/vite/types/importGlob.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ export interface ImportGlobOptions<

export type GeneralImportGlobOptions = ImportGlobOptions<boolean, string>

/**
* Declare Worker in case DOM is not added to the tsconfig lib causing
* Worker interface is not defined. For developers with DOM lib added,
* the Worker interface will be merged correctly.
*/
declare global {
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
interface Worker {}
}

export interface KnownAsTypeMap {
raw: string
url: string
Expand Down