Update client types to match Vite (#6770)

* fix(types): Update client types to match Vite's

* chore: changeset
This commit is contained in:
Erika 2023-04-06 15:13:13 +02:00 committed by GitHub
parent 72fed684a3
commit 52d7a4a011
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 60 additions and 5 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Updated types to match newer Vite versions

View file

@ -178,6 +178,10 @@ declare module '*.module.pcss' {
const classes: CSSModuleClasses;
export default classes;
}
declare module '*.module.sss' {
const classes: CSSModuleClasses;
export default classes;
}
// CSS
declare module '*.css' {
@ -208,9 +212,31 @@ declare module '*.pcss' {
const css: string;
export default css;
}
declare module '*.sss' {
const css: string;
export default css;
}
// Built-in asset types
// see `src/constants.ts`
// see `src/node/constants.ts`
// images
declare module '*.jfif' {
const src: string;
export default src;
}
declare module '*.pjpeg' {
const src: string;
export default src;
}
declare module '*.pjp' {
const src: string;
export default src;
}
declare module '*.ico' {
const src: string;
export default src;
}
// media
declare module '*.mp4' {
@ -242,6 +268,11 @@ declare module '*.aac' {
export default src;
}
declare module '*.opus' {
const src: string;
export default src;
}
// fonts
declare module '*.woff' {
const src: string;
@ -265,10 +296,6 @@ declare module '*.otf' {
}
// other
declare module '*.wasm' {
const initWasm: (options: WebAssembly.Imports) => Promise<WebAssembly.Exports>;
export default initWasm;
}
declare module '*.webmanifest' {
const src: string;
export default src;
@ -282,6 +309,12 @@ declare module '*.txt' {
export default src;
}
// wasm?init
declare module '*.wasm?init' {
const initWasm: (options: WebAssembly.Imports) => Promise<WebAssembly.Instance>;
export default initWasm;
}
// web worker
declare module '*?worker' {
const workerConstructor: {
@ -297,6 +330,11 @@ declare module '*?worker&inline' {
export default workerConstructor;
}
declare module '*?worker&url' {
const src: string;
export default src;
}
declare module '*?sharedworker' {
const sharedWorkerConstructor: {
new (): SharedWorker;
@ -304,6 +342,18 @@ declare module '*?sharedworker' {
export default sharedWorkerConstructor;
}
declare module '*?sharedworker&inline' {
const sharedWorkerConstructor: {
new (): SharedWorker;
};
export default sharedWorkerConstructor;
}
declare module '*?sharedworker&url' {
const src: string;
export default src;
}
declare module '*?raw' {
const src: string;
export default src;