2021-05-12 06:35:00 +00:00
|
|
|
declare module '*.svg' {
|
|
|
|
const content: any;
|
|
|
|
export default content;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare module '*.png' {
|
|
|
|
const content: any;
|
|
|
|
export default content;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare const __DEV__: boolean;
|
|
|
|
|
|
|
|
declare namespace NodeJS {
|
|
|
|
interface Global {
|
|
|
|
__DEV__: boolean;
|
2021-12-07 20:39:40 +00:00
|
|
|
/** this is required by codemirror/addon/lint/json-lint */
|
|
|
|
jsonlint: any;
|
|
|
|
/** this is required by codemirror/addon/lint/yaml-lint */
|
|
|
|
jsyaml: any;
|
2021-05-12 06:35:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Window {
|
|
|
|
__REDUX_DEVTOOLS_EXTENSION_COMPOSE__: Function;
|
2022-02-16 18:28:23 +00:00
|
|
|
main: {
|
|
|
|
restart: () => void;
|
|
|
|
authorizeUserInWindow: (options: { url: string; urlSuccessRegex?: RegExp; urlFailureRegex?: RegExp; sessionId: string }) => Promise<string>;
|
|
|
|
setMenuBarVisibility: (visible: boolean) => void;
|
|
|
|
installPlugin: (url: string) => void;
|
2022-03-03 13:42:04 +00:00
|
|
|
writeFile: (options: {path: string; content: string}) => Promise<string>;
|
|
|
|
cancelCurlRequest: (requestId: string) => void;
|
|
|
|
curlRequest: (options: {
|
|
|
|
curlOptions: CurlOpt[];
|
|
|
|
responseBodyPath: string;
|
|
|
|
maxTimelineDataSizeKB: number;
|
|
|
|
requestId: string;
|
|
|
|
requestBodyPath?: string;
|
|
|
|
isMultipart: boolean;
|
|
|
|
}) => Promise<{
|
|
|
|
patch: ResponsePatch;
|
|
|
|
debugTimeline: ResponseTimelineEntry[];
|
|
|
|
headerResults: HeaderResult[];
|
|
|
|
}>;
|
2022-02-16 18:28:23 +00:00
|
|
|
};
|
|
|
|
dialog: {
|
|
|
|
showOpenDialog: (options: Electron.OpenDialogOptions) => Promise<Electron.OpenDialogReturnValue>;
|
|
|
|
showSaveDialog: (options: Electron.SaveDialogOptions) => Promise<Electron.SaveDialogReturnValue>;
|
|
|
|
};
|
|
|
|
app: {
|
|
|
|
getPath: (name: string) => string;
|
|
|
|
getAppPath: () => string;
|
|
|
|
};
|
|
|
|
shell: {
|
|
|
|
showItemInFolder: (fullPath: string) => void;
|
|
|
|
};
|
2021-05-12 06:35:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// needed for @hot-loader/react-dom in order for TypeScript to build
|
|
|
|
declare const __REACT_DEVTOOLS_GLOBAL_HOOK__: undefined | {
|
|
|
|
checkDCE: Function;
|
|
|
|
};
|