mirror of
https://github.com/BradNut/personal-website-sveltekit
synced 2025-09-08 23:20:18 +00:00
Adding TS details about enhanced image.
This commit is contained in:
parent
112e102f4f
commit
890d18d40f
1 changed files with 11 additions and 3 deletions
14
src/ambient.d.ts
vendored
14
src/ambient.d.ts
vendored
|
|
@ -1,6 +1,14 @@
|
||||||
// Stop warnings of all imports from your image assets directory.
|
// Stop warnings of all imports from your image assets directory.
|
||||||
|
|
||||||
declare module '$lib/assets/*' {
|
// Enhanced images (?enhanced) provide a Picture for <enhanced:img>
|
||||||
const image: Record<string, any>;
|
declare module '$lib/assets/*?enhanced' {
|
||||||
export default image;
|
import type { Picture } from '@sveltejs/enhanced-img';
|
||||||
|
const picture: Picture;
|
||||||
|
export default picture;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Plain asset imports fallback to string URLs
|
||||||
|
declare module '$lib/assets/*' {
|
||||||
|
const src: string;
|
||||||
|
export default src;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue