mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-30 18:00:06 -05:00
Move more .d.ts files to .ts (#5060)
* Move more .d.ts files to .ts * Add release notes * Some errors with templates snuck in * Fix API build * CodeRabbit feedback * Move budget templates to new directory * Fix type errors in library module
This commit is contained in:
committed by
GitHub
parent
8ccc1af77e
commit
5a40b017f0
56
packages/loot-core/typings/window.ts
Normal file
56
packages/loot-core/typings/window.ts
Normal file
@@ -0,0 +1,56 @@
|
||||
// @ts-strict-ignore
|
||||
export {};
|
||||
|
||||
type FileDialogOptions = {
|
||||
properties?: Array<'openFile' | 'openDirectory'>;
|
||||
filters?: {
|
||||
name: string;
|
||||
extensions: string[];
|
||||
}[];
|
||||
};
|
||||
|
||||
type Actual = {
|
||||
IS_DEV: boolean;
|
||||
ACTUAL_VERSION: string;
|
||||
openURLInBrowser: (url: string) => void;
|
||||
saveFile: (
|
||||
contents: string | Buffer,
|
||||
filename: string,
|
||||
dialogTitle?: string,
|
||||
) => Promise<void>;
|
||||
openFileDialog: (options: FileDialogOptions) => Promise<string[]>;
|
||||
relaunch: () => void;
|
||||
reload: (() => Promise<void>) | undefined;
|
||||
restartElectronServer: () => void;
|
||||
moveBudgetDirectory: (
|
||||
currentBudgetDirectory: string,
|
||||
newDirectory: string,
|
||||
) => Promise<void>;
|
||||
applyAppUpdate: () => Promise<void>;
|
||||
updateAppMenu: (budgetId: string) => void;
|
||||
ipcConnect: (callback: (client) => void) => void;
|
||||
getServerSocket: () => Promise<Worker | null>;
|
||||
setTheme: (theme: string) => void;
|
||||
logToTerminal: (...args: unknown[]) => void;
|
||||
onEventFromMain: (
|
||||
event: string,
|
||||
listener: (...args: unknown[]) => void,
|
||||
) => void;
|
||||
isUpdateReadyForDownload: () => boolean;
|
||||
waitForUpdateReadyForDownload: () => Promise<void>;
|
||||
startSyncServer: () => Promise<void>;
|
||||
stopSyncServer: () => Promise<void>;
|
||||
isSyncServerRunning: () => Promise<boolean>;
|
||||
startOAuthServer: () => Promise<string>;
|
||||
};
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
__navigate?: import('react-router').NavigateFunction;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-var
|
||||
var Actual: Actual;
|
||||
// eslint-disable-next-line no-var
|
||||
var IS_TESTING: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user