-
Notifications
You must be signed in to change notification settings - Fork 213
/
internal.d.ts
43 lines (36 loc) · 930 Bytes
/
internal.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
// object extensions from apputils
//import {IncomingMessage} from "http"; // if we import anything in a .d.ts file it won't be recognized globally anymore
interface String {
replaceAll: (search: string, replace: string) => string;
}
interface Map<K, V> {
toObject: () => any;
toArray: () => any[];
toToupleArray:<V> () => [string, V][]; // MapToupleArray
}
interface Set<T> {
toObject: () => any;
toArray: () => any[];
}
interface Array<T> {
mathMax: () => number;
mathMin: () => number;
arrayDiff: (arr: any[]) => any[];
shuffle: () => void;
}
interface WebSocket {
id: string;
}
declare module "http" {
interface IncomingMessage { // part of multihttpdispatcher module
query: {
[key: string] : string;
}
params: {
[key: string] : string;
}
formFields: {
[key: string] : string;
}
}
}