34 lines
701 B
TypeScript
34 lines
701 B
TypeScript
/// <reference types="vite/client" />
|
|
/// <reference types="vite-plugin-svgr/client" />
|
|
|
|
// Imagetools types inspired by: https://github.com/JonasKruckenberg/imagetools/issues/160
|
|
// These only work for my specific imports
|
|
declare module "*as=metadata" {
|
|
interface Metadata {
|
|
src: string;
|
|
width: number;
|
|
height: number;
|
|
format: string;
|
|
}
|
|
const output: Metadata;
|
|
export default output;
|
|
}
|
|
|
|
declare module "*as=picture" {
|
|
type Primaries = {
|
|
avif: string;
|
|
// jxl: string; // Broken right now
|
|
webp: string;
|
|
};
|
|
type Fallback = {
|
|
src: string;
|
|
w: number;
|
|
h: number;
|
|
};
|
|
type Picture = {
|
|
sources: Primaries;
|
|
img: Fallback;
|
|
};
|
|
const output: Picture;
|
|
export default output;
|
|
}
|