UNPKG

809 BTypeScriptView Raw
1import { Reader, Response } from 'mmdb-lib';
2type Callback = () => void;
3export interface OpenOpts {
4 cache?: {
5 max: number;
6 };
7 watchForUpdates?: boolean;
8 watchForUpdatesNonPersistent?: boolean;
9 watchForUpdatesHook?: Callback;
10}
11export declare const open: <T extends Response>(filepath: string, opts?: OpenOpts, cb?: Callback) => Promise<Reader<T>>;
12export declare const openSync: () => never;
13export declare const init: () => never;
14export declare const validate: (ip: string) => boolean;
15export * from 'mmdb-lib';
16declare const _default: {
17 init: () => never;
18 open: <T extends Response>(filepath: string, opts?: OpenOpts, cb?: Callback) => Promise<Reader<T>>;
19 openSync: () => never;
20 validate: (ip: string) => boolean;
21};
22export default _default;
23export { Reader };