firq-dev-website/src/utils/tools.ts
Firq 8e6be5ae82
All checks were successful
/ get-version (push) Successful in 2s
/ astro-check (push) Successful in 14s
Revert "Source Sets"
This reverts commit d93d0416e5.
2024-10-22 20:51:48 +02:00

5 lines
242 B
TypeScript

export function plsLoadImage(record: Record<string, () => Promise<{default: ImageMetadata}>>, path: string) {
const loadedImage = record[path]?.();
if (!loadedImage) throw new Error("Asset was not found:" + path);
return loadedImage;
}