Moved nice tools from fgo-ta over
This commit is contained in:
parent
e406bd8764
commit
7ed78bceff
10 changed files with 72 additions and 41 deletions
src/utils
5
src/utils/tools.ts
Normal file
5
src/utils/tools.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue