From 2d6bf75871a74f239eddc03ba61576ec83825fd0 Mon Sep 17 00:00:00 2001 From: Beef Date: Thu, 9 Feb 2023 21:48:43 +0000 Subject: [PATCH] [TS] Add missing definitions --- src/def.d.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/def.d.ts b/src/def.d.ts index e01199d..6bea4d2 100644 --- a/src/def.d.ts +++ b/src/def.d.ts @@ -191,7 +191,7 @@ interface DCDFileManager { */ readFile(path: string, encoding: "base64" | "utf8"): Promise; /** - * Beware! This function has differing functionality on IOS and Android. + * Beware! This function has differing functionality on iOS and Android. * @param storageDir Either `cache` or `documents`. * @param path Path in `storageDir`, parents are recursively created. * @param data The data to write to the file @@ -286,6 +286,10 @@ interface VendettaObject { navigation: PropIntellisense<"pushLazy">; navigationStack: PropIntellisense<"createStackNavigator">; NavigationNative: PropIntellisense<"NavigationContainer">; + // You may ask: "Why not just install Flux's types?" + // Answer: Discord have a (presumably proprietary) fork. It's wildly different. + Flux: PropIntellisense<"connectStores">; + FluxDispatcher: PropIntellisense<"_currentDispatchActionType">; React: typeof _React; ReactNative: typeof _RN; }; @@ -310,7 +314,7 @@ interface VendettaObject { components: { Forms: PropIntellisense<"Form" | "FormSection">; General: PropIntellisense<"Button" | "Text" | "View">; - Search: _React.Component; + Search: _React.ComponentType; } toasts: { showToast: (content: string, asset: number) => void; @@ -326,6 +330,7 @@ interface VendettaObject { plugins: { plugins: Indexable; fetchPlugin: (id: string, enabled: boolean) => void; + installPlugin: (id: string, enabled: boolean) => void; evalPlugin: (plugin: Plugin) => void; stopPlugin: (id: string, disable: boolean) => void; removePlugin: (id: string) => void;