UNPKG

1.02 kBTypeScriptView Raw
1// this file is conditionally added/removed to next-env.d.ts
2// if the static image import handling is enabled
3
4interface StaticImageData {
5 src: string
6 height: number
7 width: number
8 placeholder?: string
9}
10
11declare module '*.png' {
12 const content: StaticImageData
13
14 export default content
15}
16
17declare module '*.svg' {
18 /**
19 * Use `any` to avoid conflicts with
20 * `@svgr/webpack` plugin or
21 * `babel-plugin-inline-react-svg` plugin.
22 */
23 const content: any
24
25 export default content
26}
27
28declare module '*.jpg' {
29 const content: StaticImageData
30
31 export default content
32}
33
34declare module '*.jpeg' {
35 const content: StaticImageData
36
37 export default content
38}
39
40declare module '*.gif' {
41 const content: StaticImageData
42
43 export default content
44}
45
46declare module '*.webp' {
47 const content: StaticImageData
48
49 export default content
50}
51
52declare module '*.ico' {
53 const content: StaticImageData
54
55 export default content
56}
57
58declare module '*.bmp' {
59 const content: StaticImageData
60
61 export default content
62}