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
|
2024-05-02 09:28:57 +03:00
|
|
|
declare const YDOC_SERVER_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 {
|
2024-05-24 12:21:32 +03:00
|
|
|
/**
|
|
|
|
* Select path for local file or directory using the system file browser.
|
|
|
|
* 'filePath' is same as 'file', but allows picking non-existing files.
|
|
|
|
*/
|
2024-03-25 20:07:04 +03:00
|
|
|
readonly openFileBrowser: (
|
2024-05-24 12:21:32 +03:00
|
|
|
kind: 'file' | 'directory' | 'default' | 'filePath',
|
2024-03-25 20:07:04 +03:00
|
|
|
) => Promise<string[] | undefined>
|
2024-03-14 15:27:15 +03:00
|
|
|
}
|
2024-05-27 20:32:42 +03:00
|
|
|
|
|
|
|
interface LogEvent {
|
|
|
|
(message: string, projectId?: string | null, metadata?: object | null): void
|
|
|
|
}
|