[TS] Update definitions to match API

This commit is contained in:
Beef 2023-02-04 02:29:45 +00:00
parent 76ea19f8ef
commit 0be8cdac05

14
src/def.d.ts vendored
View file

@ -204,7 +204,6 @@ interface VendettaObject {
after: typeof _spitroast.after; after: typeof _spitroast.after;
before: typeof _spitroast.before; before: typeof _spitroast.before;
instead: typeof _spitroast.instead; instead: typeof _spitroast.instead;
unpatchAll: typeof _spitroast.unpatchAll;
}; };
metro: { metro: {
findByProps: PropsFinder; findByProps: PropsFinder;
@ -217,6 +216,13 @@ interface VendettaObject {
i18n: PropIntellisense<"Messages">; i18n: PropIntellisense<"Messages">;
url: PropIntellisense<"openURL">; url: PropIntellisense<"openURL">;
toasts: PropIntellisense<"open" | "close">; toasts: PropIntellisense<"open" | "close">;
stylesheet: PropIntellisense<"createThemedStyleSheet">;
clipboard: PropIntellisense<"setString" | "getString" | "hasString">;
assets: PropIntellisense<"registerAsset">;
invites: PropIntellisense<"acceptInviteAndTransitionToInviteChannel">;
navigation: PropIntellisense<"pushLazy">;
navigationStack: PropIntellisense<"createStackNavigator">;
NavigationNative: PropIntellisense<"NavigationContainer">;
React: typeof _React; React: typeof _React;
ReactNative: typeof _RN; ReactNative: typeof _RN;
}; };
@ -232,11 +238,14 @@ interface VendettaObject {
}; };
debug: { debug: {
connectToDebugger: (url: string) => void; connectToDebugger: (url: string) => void;
// TODO: Type output?
getDebugInfo: () => void;
} }
ui: { ui: {
components: { components: {
Forms: PropIntellisense<"Form" | "FormSection">; Forms: PropIntellisense<"Form" | "FormSection">;
General: PropIntellisense<"Button" | "Text" | "View">; General: PropIntellisense<"Button" | "Text" | "View">;
Search: _React.Component;
} }
toasts: { toasts: {
showToast: (content: string, asset: number) => void; showToast: (content: string, asset: number) => void;
@ -253,7 +262,7 @@ interface VendettaObject {
plugins: Indexable<Plugin>; plugins: Indexable<Plugin>;
fetchPlugin: (id: string, enabled: boolean) => void; fetchPlugin: (id: string, enabled: boolean) => void;
evalPlugin: (plugin: Plugin) => void; evalPlugin: (plugin: Plugin) => void;
stopPlugin: (id: string) => void; stopPlugin: (id: string, disable: boolean) => void;
removePlugin: (id: string) => void; removePlugin: (id: string) => void;
getSettings: (id: string) => JSX.Element; getSettings: (id: string) => JSX.Element;
}; };
@ -270,6 +279,7 @@ interface VendettaObject {
settings: Settings; settings: Settings;
logger: Logger; logger: Logger;
version: string; version: string;
unload: () => void;
} }
interface VendettaPluginObject { interface VendettaPluginObject {