diff options
Diffstat (limited to 'src/@types')
| -rw-r--r-- | src/@types/lookup-dns-cache.d.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/@types/lookup-dns-cache.d.ts b/src/@types/lookup-dns-cache.d.ts new file mode 100644 index 0000000000..ae93cc539b --- /dev/null +++ b/src/@types/lookup-dns-cache.d.ts @@ -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; +} |