Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions .changeset/tired-papayas-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/enhanced-img': minor
---

feat: export type Picture
Comment thread
elliott-with-the-longest-name-on-github marked this conversation as resolved.
Outdated
2 changes: 2 additions & 0 deletions packages/enhanced-img/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import type { Plugin } from 'vite';
import type { Picture } from 'vite-imagetools';
import './ambient.js';

export type { Picture } from 'vite-imagetools';

@teemingc teemingc Jan 30, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import type { Picture } from 'vite-imagetools';
import './ambient.js';
export type { Picture } from 'vite-imagetools';
import './ambient.js';
export type { Picture } from 'vite-imagetools';

Afaik we only need one statement

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work because Picture is used elsewhere in the file but now wouldn't be imported. I fixed it though


type EnhancedImgAttributes = Omit<HTMLImgAttributes, 'src'> & { src: string | Picture };

// https://svelte.dev/docs/svelte/typescript#enhancing-built-in-dom-types
Expand Down
Loading