Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

vite-env.d.ts

18 lines502 Bytes

1/// <reference types="vite/client" />
2​
3import type { NativeApi } from "@t3tools/contracts";
4​
5interface DesktopBridge {
6 getWsUrl: () => string | null;
7 pickFolder: () => Promise<string | null>;
8 confirm: (message: string) => Promise<boolean>;
9 showContextMenu: (items: readonly { id: string; label: string }[]) => Promise<string | null>;
10 openExternal: (url: string) => Promise<boolean>;
12​
13declare global {
14 interface Window {
15 nativeApi?: NativeApi;
16 desktopBridge?: DesktopBridge;
17 }