2023-09-05 01:27:33 +03:00
|
|
|
/// <reference types="vite/client" />
|
|
|
|
|
2023-09-22 06:43:25 +03:00
|
|
|
declare const PROJECT_MANAGER_URL: string
|
2023-10-11 16:04:38 +03:00
|
|
|
declare const RUNNING_VITEST: boolean
|
2023-12-21 18:04:30 +03:00
|
|
|
declare const IS_CLOUD_BUILD: boolean
|
2023-11-15 19:26:18 +03:00
|
|
|
|
|
|
|
interface Document {
|
|
|
|
caretPositionFromPoint(x: number, y: number): { offsetNode: Node; offset: number } | null
|
|
|
|
}
|
2024-03-14 15:27:15 +03:00
|
|
|
|
|
|
|
interface Window {
|
|
|
|
fileBrowserApi: FileBrowserApi
|
|
|
|
}
|
|
|
|
|
|
|
|
/** `window.fileBrowserApi` is a context bridge to the main process, when we're running in an
|
|
|
|
* Electron context.
|
|
|
|
*
|
|
|
|
* # Safety
|
|
|
|
*
|
|
|
|
* We're assuming that the main process has exposed the `fileBrowserApi` context bridge (see
|
|
|
|
* `app/ide-desktop/lib/client/src/preload.ts` for details), and that it contains the functions defined in this
|
|
|
|
* interface.
|
|
|
|
*/
|
|
|
|
interface FileBrowserApi {
|
|
|
|
/** Select path for local file or directory using the system file browser. */
|
2024-03-25 20:07:04 +03:00
|
|
|
readonly openFileBrowser: (
|
|
|
|
kind: 'file' | 'directory' | 'default',
|
|
|
|
) => Promise<string[] | undefined>
|
2024-03-14 15:27:15 +03:00
|
|
|
}
|