diff options
| author | Acid Chicken (硫酸鶏) <root@acid-chicken.com> | 2019-01-31 17:53:49 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-31 17:53:49 +0900 |
| commit | 76569bfb08b781ca2596a271408d22d9ea719385 (patch) | |
| tree | 9810122a7a2d8857dd318f63c4766f48441f9f31 /src/@types | |
| parent | Create type definition for 'promise-any' (#4055) (diff) | |
| download | sharkey-76569bfb08b781ca2596a271408d22d9ea719385.tar.gz sharkey-76569bfb08b781ca2596a271408d22d9ea719385.tar.bz2 sharkey-76569bfb08b781ca2596a271408d22d9ea719385.zip | |
Create type definition for 'lookup-dns-cache' (#4051)
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; +} |