Skip to content

Commit 890d18d

Browse files
author
Bradley Shellnut
committed
Adding TS details about enhanced image.
1 parent 112e102 commit 890d18d

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/ambient.d.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
// Stop warnings of all imports from your image assets directory.
22

3+
// Enhanced images (?enhanced) provide a Picture for <enhanced:img>
4+
declare module '$lib/assets/*?enhanced' {
5+
import type { Picture } from '@sveltejs/enhanced-img';
6+
const picture: Picture;
7+
export default picture;
8+
}
9+
10+
// Plain asset imports fallback to string URLs
311
declare module '$lib/assets/*' {
4-
const image: Record<string, any>;
5-
export default image;
12+
const src: string;
13+
export default src;
614
}

0 commit comments

Comments
 (0)