Skip to content

Commit b73b05e

Browse files
committed
chore: holy types
1 parent 133ebff commit b73b05e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/renderer/modules/common/components.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ type DiscordComponents = {
5858
| TextAreaType
5959
| TextInputType
6060
| OriginalTooltipType
61+
| unknown
6162
>;
6263

6364
export default await waitForProps<DiscordComponents>("ConfirmModal", "ToastPosition", "Text");

src/renderer/modules/components/ContextMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ const source = sourceStrings[rawMod?.id].matchAll(
170170
/if\(\w+\.type===\w+\.(\w+)(?:\.\w+)?\).+?type:"(.+?)"/gs,
171171
);
172172

173-
const menuComponents = Object.entries(components)
173+
const menuComponents = Object.entries(components as Record<string, () => null>)
174174
.filter(([_, m]) => /^function.+\(e?\){(\s+)?return null(\s+)?}$/.test(m?.toString?.()))
175175
.reduce<Record<string, () => null>>((components, [name, component]) => {
176176
components[name.substring(0, 2)] = component;

0 commit comments

Comments
 (0)