Repository: withastro/astro
File: packages/astro/client.d.ts (TypeScript)

Code before:
declare module '*.jpeg' {
	const metadata: ImageMetadata;
	export default metadata;
}
declare module '*.jpg' {
	const metadata: ImageMetadata;
	export default metadata;
}
declare module '*.png' {
	const metadata: ImageMetadata;
	export default metadata;
}
declare module '*.tiff' {
	const metadata: ImageMetadata;
	export default metadata;
}
declare module '*.webp' {
	const metadata: ImageMetadata;
	export default metadata;
}
declare module '*.avif' {
	const metadata: ImageMetadata;
	export default metadata;
}
declare module '*.svg' {
	const Component: SvgComponent;
	export default Component;
}

declare module 'astro:transitions' {
	type TransitionModule = typeof import('./dist/virtual-modules/transitions.js');
	export const slide: TransitionModule['slide'];
	export const fade: TransitionModule['fade'];
	export const createAnimationScope: TransitionModule['createAnimationScope'];

	type ClientRouterModule = typeof import('./components/ClientRouter.astro');
	/**
	 * @deprecated The ViewTransitions component has been renamed to ClientRouter
	 */
	export const ViewTransitions: ClientRouterModule['default'];
	export const ClientRouter: ClientRouterModule['default'];
}

declare module 'astro:transitions/client' {
	type TransitionRouterModule = typeof import('./dist/virtual-modules/transitions-router.js');
	export const navigate: TransitionRouterModule['navigate'];
	export const supportsViewTransitions: TransitionRouterModule['supportsViewTransitions'];
	export const getFallback: TransitionRouterModule['getFallback'];
	export const transitionEnabledOnThisPage: TransitionRouterModule['transitionEnabledOnThisPage'];

	export type Fallback = import('./dist/virtual-modules/transitions-types.js').Fallback;

Review comment (suggestion):
Here the type is scoped so it doesn't leak. Also I think we should move the ImageMetadata usage here:

```suggestion
  type SvgComponent = import('./dist/assets/types.js').SvgComponent;
	const Component: SvgComponent & ImageMetadata;
```

Code after:
}
declare module '*.jpg' {
	const metadata: ImageMetadata;
	export default metadata;
}
declare module '*.png' {
	const metadata: ImageMetadata;
	export default metadata;
}
declare module '*.tiff' {
	const metadata: ImageMetadata;
	export default metadata;
}
declare module '*.webp' {
	const metadata: ImageMetadata;
	export default metadata;
}
declare module '*.avif' {
	const metadata: ImageMetadata;
	export default metadata;
}
declare module '*.svg' {
	const Component: import('./types').SvgComponent & ImageMetadata;
	export default Component;
}

declare module 'astro:transitions' {
	type TransitionModule = typeof import('./dist/virtual-modules/transitions.js');
	export const slide: TransitionModule['slide'];
	export const fade: TransitionModule['fade'];
	export const createAnimationScope: TransitionModule['createAnimationScope'];

	type ClientRouterModule = typeof import('./components/ClientRouter.astro');
	/**
	 * @deprecated The ViewTransitions component has been renamed to ClientRouter
	 */
	export const ViewTransitions: ClientRouterModule['default'];
	export const ClientRouter: ClientRouterModule['default'];
}

declare module 'astro:transitions/client' {
	type TransitionRouterModule = typeof import('./dist/virtual-modules/transitions-router.js');
	export const navigate: TransitionRouterModule['navigate'];
	export const supportsViewTransitions: TransitionRouterModule['supportsViewTransitions'];
	export const getFallback: TransitionRouterModule['getFallback'];
	export const transitionEnabledOnThisPage: TransitionRouterModule['transitionEnabledOnThisPage'];

	export type Fallback = import('./dist/virtual-modules/transitions-types.js').Fallback;
	export type Direction = import('./dist/virtual-modules/transitions-types.ts').Direction;
	// biome-ignore format: bug
	export type NavigationTypeString = import('./dist/virtual-modules/transitions-types.js').NavigationTypeString;