From de3d422754ba9a484e9fc55c22b51d8452092b19 Mon Sep 17 00:00:00 2001 From: Beef Date: Sat, 7 Jan 2023 23:06:36 +0000 Subject: [PATCH] [Assets] Move to use Indexable type --- src/def.d.ts | 6 +----- src/ui/assets.ts | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/def.d.ts b/src/def.d.ts index a6e7905..2f0725e 100644 --- a/src/def.d.ts +++ b/src/def.d.ts @@ -33,10 +33,6 @@ interface Asset { id: number; } -interface Assets { - [id: string]: Asset; -} - interface PluginAuthor { name: string; id: string; @@ -109,7 +105,7 @@ interface VendettaObject { showToast: (content: string, asset: number) => void; }; assets: { - all: Assets; + all: Indexable; find: (filter: (a: any) => void) => Asset | null | undefined; getAssetByName: (name: string) => Asset; getAssetByID: (id: number) => Asset; diff --git a/src/ui/assets.ts b/src/ui/assets.ts index 88ea00a..28ce9b6 100644 --- a/src/ui/assets.ts +++ b/src/ui/assets.ts @@ -1,8 +1,8 @@ -import { Asset, Assets } from "@types"; +import { Asset, Indexable, } from "@types"; import { after } from "@lib/patcher"; import { assets } from "@metro/common"; -export const all: Assets = {}; +export const all: Indexable = {}; export default function patchAssets() { try {