0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-27 22:19:04 -05:00

fix: no need for type

This commit is contained in:
Princesseuh 2024-05-25 04:25:22 +02:00
parent 63b73a1106
commit 095083ed6c
No known key found for this signature in database
GPG key ID: 105BBD6D57F2B0C0
2 changed files with 11 additions and 13 deletions

View file

@ -72,38 +72,36 @@ declare module 'astro:assets' {
export const { getImage, getConfiguredImageService, imageConfig, Image, Picture }: AstroAssets; export const { getImage, getConfiguredImageService, imageConfig, Image, Picture }: AstroAssets;
} }
type ImageMetadata = import('./dist/assets/types.js').ImageMetadata;
declare module '*.gif' { declare module '*.gif' {
const metadata: ImageMetadata; const metadata: import('./dist/assets/types.js').ImageMetadata;
export default metadata; export default metadata;
} }
declare module '*.jpeg' { declare module '*.jpeg' {
const metadata: ImageMetadata; const metadata: import('./dist/assets/types.js').ImageMetadata;
export default metadata; export default metadata;
} }
declare module '*.jpg' { declare module '*.jpg' {
const metadata: ImageMetadata; const metadata: import('./dist/assets/types.js').ImageMetadata;
export default metadata; export default metadata;
} }
declare module '*.png' { declare module '*.png' {
const metadata: ImageMetadata; const metadata: import('./dist/assets/types.js').ImageMetadata;
export default metadata; export default metadata;
} }
declare module '*.tiff' { declare module '*.tiff' {
const metadata: ImageMetadata; const metadata: import('./dist/assets/types.js').ImageMetadata;
export default metadata; export default metadata;
} }
declare module '*.webp' { declare module '*.webp' {
const metadata: ImageMetadata; const metadata: import('./dist/assets/types.js').ImageMetadata;
export default metadata; export default metadata;
} }
declare module '*.svg' { declare module '*.svg' {
const metadata: ImageMetadata; const metadata: import('./dist/assets/types.js').ImageMetadata;
export default metadata; export default metadata;
} }
declare module '*.avif' { declare module '*.avif' {
const metadata: ImageMetadata; const metadata: import('./dist/assets/types.js').ImageMetadata;
export default metadata; export default metadata;
} }
@ -145,7 +143,7 @@ declare module 'astro:transitions/client' {
} }
declare module 'astro:prefetch' { declare module 'astro:prefetch' {
export { prefetch, PrefetchOptions } from 'astro/virtual-modules/prefetch.js'; export { PrefetchOptions, prefetch } from 'astro/virtual-modules/prefetch.js';
} }
declare module 'astro:i18n' { declare module 'astro:i18n' {

View file

@ -33,7 +33,7 @@ export const image_metadata = Symbol.for('image_metadata');
/** /**
* Type returned by ESM imports of images * Type returned by ESM imports of images
*/ */
export type ImageMetadata = { export interface ImageMetadata {
src: string; src: string;
width: number; width: number;
height: number; height: number;
@ -42,7 +42,7 @@ export type ImageMetadata = {
/** @internal */ /** @internal */
fsPath: string; fsPath: string;
[image_metadata]: true; [image_metadata]: true;
}; }
/** /**
* A yet to be completed with an url `SrcSetValue`. Other hooks will only see a resolved value, where the URL of the image has been added. * A yet to be completed with an url `SrcSetValue`. Other hooks will only see a resolved value, where the URL of the image has been added.