Create type definition for 'lookup-dns-cache' (#4051)
This commit is contained in:
committed by
GitHub
parent
bbcdf1bb8a
commit
76569bfb08
17
src/@types/lookup-dns-cache.d.ts
vendored
Normal file
17
src/@types/lookup-dns-cache.d.ts
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
declare module 'lookup-dns-cache' {
|
||||
type IPv4 = 4;
|
||||
|
||||
type IPv6 = 6;
|
||||
|
||||
type Family = IPv4 | IPv6 | undefined;
|
||||
|
||||
interface IRunOptions {
|
||||
family?: Family;
|
||||
all?: boolean;
|
||||
}
|
||||
|
||||
type RunCallback = (error: Error | null, address?: string | string[], family?: Family) => void;
|
||||
|
||||
export function lookup(hostname: string, options: IRunOptions | Family, callback: RunCallback): {} | undefined;
|
||||
export function lookup(hostname: string, callback: RunCallback): {} | undefined;
|
||||
}
|
Reference in New Issue
Block a user