libresolver/dist/resolverModule.d.ts

24 lines
741 B
TypeScript
Raw Normal View History

2022-08-18 14:58:17 +00:00
import type { DNSResult, ResolverOptions } from "./types.js";
2022-08-18 17:09:02 +00:00
import { ResolverRegistry } from "@lumeweb/resolver";
2022-08-18 15:01:28 +00:00
export interface ResolverModule {
2022-08-19 15:53:39 +00:00
new (resolver: ResolverRegistry): any;
2022-08-18 15:01:28 +00:00
resolve(
domain: string,
options: ResolverOptions,
bypassCache: boolean
): Promise<DNSResult>;
2022-08-19 00:01:36 +00:00
getSupportedTlds(): string[];
2022-08-18 14:58:17 +00:00
}
2022-08-19 15:53:39 +00:00
export declare abstract class AbstractResolverModule implements ResolverModule {
2022-08-18 17:09:02 +00:00
protected resolver: ResolverRegistry;
constructor(resolver: ResolverRegistry);
2022-08-18 15:01:28 +00:00
abstract resolve(
input: string,
options: ResolverOptions,
2022-08-18 18:09:07 +00:00
bypassCache: boolean
2022-08-18 15:01:28 +00:00
): Promise<DNSResult>;
getSupportedTlds(): string[];
isTldSupported(domain: string): boolean;
2022-08-18 14:58:17 +00:00
}
2022-08-18 15:01:28 +00:00
//# sourceMappingURL=resolverModule.d.ts.map