[TS] Add missing definitions
This commit is contained in:
parent
c2ebff3e93
commit
2d6bf75871
1 changed files with 7 additions and 2 deletions
9
src/def.d.ts
vendored
9
src/def.d.ts
vendored
|
@ -191,7 +191,7 @@ interface DCDFileManager {
|
||||||
*/
|
*/
|
||||||
readFile(path: string, encoding: "base64" | "utf8"): Promise<string>;
|
readFile(path: string, encoding: "base64" | "utf8"): Promise<string>;
|
||||||
/**
|
/**
|
||||||
* 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 storageDir Either `cache` or `documents`.
|
||||||
* @param path Path in `storageDir`, parents are recursively created.
|
* @param path Path in `storageDir`, parents are recursively created.
|
||||||
* @param data The data to write to the file
|
* @param data The data to write to the file
|
||||||
|
@ -286,6 +286,10 @@ interface VendettaObject {
|
||||||
navigation: PropIntellisense<"pushLazy">;
|
navigation: PropIntellisense<"pushLazy">;
|
||||||
navigationStack: PropIntellisense<"createStackNavigator">;
|
navigationStack: PropIntellisense<"createStackNavigator">;
|
||||||
NavigationNative: PropIntellisense<"NavigationContainer">;
|
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;
|
React: typeof _React;
|
||||||
ReactNative: typeof _RN;
|
ReactNative: typeof _RN;
|
||||||
};
|
};
|
||||||
|
@ -310,7 +314,7 @@ interface VendettaObject {
|
||||||
components: {
|
components: {
|
||||||
Forms: PropIntellisense<"Form" | "FormSection">;
|
Forms: PropIntellisense<"Form" | "FormSection">;
|
||||||
General: PropIntellisense<"Button" | "Text" | "View">;
|
General: PropIntellisense<"Button" | "Text" | "View">;
|
||||||
Search: _React.Component;
|
Search: _React.ComponentType;
|
||||||
}
|
}
|
||||||
toasts: {
|
toasts: {
|
||||||
showToast: (content: string, asset: number) => void;
|
showToast: (content: string, asset: number) => void;
|
||||||
|
@ -326,6 +330,7 @@ interface VendettaObject {
|
||||||
plugins: {
|
plugins: {
|
||||||
plugins: Indexable<Plugin>;
|
plugins: Indexable<Plugin>;
|
||||||
fetchPlugin: (id: string, enabled: boolean) => void;
|
fetchPlugin: (id: string, enabled: boolean) => void;
|
||||||
|
installPlugin: (id: string, enabled: boolean) => void;
|
||||||
evalPlugin: (plugin: Plugin) => void;
|
evalPlugin: (plugin: Plugin) => void;
|
||||||
stopPlugin: (id: string, disable: boolean) => void;
|
stopPlugin: (id: string, disable: boolean) => void;
|
||||||
removePlugin: (id: string) => void;
|
removePlugin: (id: string) => void;
|
||||||
|
|
Loading…
Reference in a new issue