diff --git a/web/globals.d.ts b/web/globals.d.ts new file mode 100644 index 000000000..66d0a864f --- /dev/null +++ b/web/globals.d.ts @@ -0,0 +1,70 @@ +// Global type declarations for static image imports +declare module '*.png' { + const content: { + src: string; + height: number; + width: number; + blurDataURL?: string; + }; + export default content; +} + +declare module '*.jpg' { + const content: { + src: string; + height: number; + width: number; + blurDataURL?: string; + }; + export default content; +} + +declare module '*.jpeg' { + const content: { + src: string; + height: number; + width: number; + blurDataURL?: string; + }; + export default content; +} + +declare module '*.gif' { + const content: { + src: string; + height: number; + width: number; + blurDataURL?: string; + }; + export default content; +} + +declare module '*.webp' { + const content: { + src: string; + height: number; + width: number; + blurDataURL?: string; + }; + export default content; +} + +declare module '*.svg' { + const content: { + src: string; + height: number; + width: number; + blurDataURL?: string; + }; + export default content; +} + +declare module '*.ico' { + const content: { + src: string; + height: number; + width: number; + blurDataURL?: string; + }; + export default content; +} diff --git a/web/tsconfig.json b/web/tsconfig.json index c4ee01583..c52a242ac 100644 --- a/web/tsconfig.json +++ b/web/tsconfig.json @@ -24,6 +24,6 @@ "@/*": ["src/*"] } }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "include": ["next-env.d.ts", "globals.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], "exclude": ["node_modules"] }