diff options
author | Vendicated <vendicated@riseup.net> | 2023-03-11 14:18:32 +0100 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2023-03-11 14:18:32 +0100 |
commit | 5d1283bd85471f160d5220c67ad521379804f9d1 (patch) | |
tree | 6cf277cb33813587b04f9dfeca3d04e615b5977a /src/plugins/consoleShortcuts.ts | |
parent | 3b945b87b8dc0901dd3f93230afdbb70b5ccd8c8 (diff) | |
download | Vencord-5d1283bd85471f160d5220c67ad521379804f9d1.tar.gz Vencord-5d1283bd85471f160d5220c67ad521379804f9d1.tar.bz2 Vencord-5d1283bd85471f160d5220c67ad521379804f9d1.zip |
Add Web/Desktop specific plugin capabilities; misc fixes
Diffstat (limited to 'src/plugins/consoleShortcuts.ts')
-rw-r--r-- | src/plugins/consoleShortcuts.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/consoleShortcuts.ts b/src/plugins/consoleShortcuts.ts index 83b5291..70a9875 100644 --- a/src/plugins/consoleShortcuts.ts +++ b/src/plugins/consoleShortcuts.ts @@ -32,14 +32,14 @@ export default definePlugin({ authors: [Devs.Ven], getShortcuts() { - function newFindWrapper(filterFactory: (props: any) => Webpack.FilterFn) { - const cache = new Map<string, any>(); + function newFindWrapper(filterFactory: (...props: any[]) => Webpack.FilterFn) { + const cache = new Map<string, unknown>(); - return function (filterProps: any) { + return function (...filterProps: unknown[]) { const cacheKey = String(filterProps); if (cache.has(cacheKey)) return cache.get(cacheKey); - const matches = findAll(filterFactory(filterProps)); + const matches = findAll(filterFactory(...filterProps)); const result = (() => { switch (matches.length) { |