(light: string, dark: string)
| 482 | }; |
| 483 | |
| 484 | function preloadImage(light: string, dark: string) { |
| 485 | preload(light, { |
| 486 | as: 'image', |
| 487 | media: '(prefers-color-scheme: light)' |
| 488 | }); |
| 489 | |
| 490 | preload(dark, { |
| 491 | as: 'image', |
| 492 | media: '(prefers-color-scheme: dark)' |
| 493 | }); |
| 494 | } |
| 495 | |
| 496 | export function preloadComponentImages(names: string[]) { |
| 497 | for (let key of names) { |
no outgoing calls
no test coverage detected