-
Notifications
You must be signed in to change notification settings - Fork 295
/
declaration.d.ts
70 lines (61 loc) · 1.38 KB
/
declaration.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import { IpcRenderer } from 'electron';
import type { request as httpRequest } from 'http';
import type { request as httpsRequest, globalAgent } from 'https';
import { Environment } from './source/common/types/environment.types';
declare module '*.svg' {
const content: any;
export default content;
}
declare module '*.scss' {
const content: any;
export default content;
}
type Daedalus = {
actions: ActionsMap;
api: Api;
environment: Object;
reset: Function;
stores: StoresMap;
translations: Object;
utils: {
crypto: {
generateMnemonic: Function;
};
};
};
interface Http {
request: httpRequest;
}
interface Https {
request: httpsRequest;
Agent: globalAgent;
}
export type $ElementType<
T extends { [P in K & any]: any },
K extends keyof T | number
> = T[K];
export type EnumMap<
K extends string,
V,
O extends Record<string, any> = any
> = O & Record<K, V & $ElementType<O, K>>;
declare global {
namespace NodeJS {
interface ProcessEnv {
WALLET_COUNT: number;
}
}
/* eslint-disable no-var, vars-on-top */
var daedalus: Daedalus;
var environment: Environment;
var http: Http;
var https: Https;
var legacyStateDir: string;
var isFlight: boolean;
var ipcRenderer: Pick<
IpcRenderer,
'on' | 'once' | 'send' | 'removeListener' | 'removeAllListeners'
>;
/* eslint-enable no-var, vars-on-top */
}
export {};