forked from geoip-lite/node-geoip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
34 lines (30 loc) · 919 Bytes
/
index.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
declare module 'geoip-lite2' {
export const cmp: number | null;
interface GeoIp2Location {
range: [number | null, number | null];
country: string;
region: string;
eu: '0' | '1';
timezone: string;
city: string;
ll: [number | null, number | null];
metro: number;
area: number;
}
function lookup(ip: string | number): GeoIp2Location | null;
function pretty(n: string | number | any[]): string;
function reloadDataSync(): void;
function reloadData(callback: (err?: Error | null) => void): Promise<void>;
function startWatchingDataUpdate(callback: () => void): void;
function stopWatchingDataUpdate(): void;
function clear(): void;
export {
lookup,
pretty,
reloadDataSync,
reloadData,
startWatchingDataUpdate,
stopWatchingDataUpdate,
clear
};
}