mockttp
Version:
Mock HTTP server for testing HTTP clients and stubbing webservices
11 lines • 432 B
TypeScript
import * as dns from 'dns';
export type DnsLookupFunction = Omit<typeof dns.lookup, '__promisify__'>;
export declare class CachedDns {
private cacheDurationMs;
private cache;
constructor(cacheDurationMs: number);
private cacheKey;
lookup: DnsLookupFunction;
}
export declare function dnsLookup(lookupFn: typeof dns.lookup | DnsLookupFunction, hostname: string): Promise<string>;
//# sourceMappingURL=dns.d.ts.map