kernel-libresolver/dist/resolverRegistry.d.ts

32 lines
897 B
TypeScript
Raw Normal View History

2023-02-19 22:17:14 +00:00
import {
DNSResult,
ResolverOptions,
ResolverModuleConstructor as ResolverModuleConstructorBase,
} from "@lumeweb/libresolver";
import { Client } from "@lumeweb/libkernel-universal";
export interface ResolverModuleConstructor
extends ResolverModuleConstructorBase {
new (resolver: ResolverRegistry): ResolverModule;
}
2022-08-18 22:28:56 +00:00
export declare class ResolverRegistry {
2022-08-19 13:57:34 +00:00
get resolvers(): Promise<Set<ResolverModule>>;
2022-08-18 22:28:56 +00:00
resolve(
domain: string,
options?: ResolverOptions,
bypassCache?: boolean
): Promise<DNSResult>;
2023-02-19 22:17:14 +00:00
register(resolver: ResolverModule): void;
clear(): void;
2022-08-18 22:28:56 +00:00
}
2023-02-19 22:17:14 +00:00
export declare class ResolverModule extends Client {
2022-08-19 13:57:34 +00:00
private resolver;
private domain;
constructor(resolver: ResolverRegistry, domain: string);
resolve(
domain: string,
options: ResolverOptions,
bypassCache: boolean
): Promise<DNSResult>;
2022-08-19 15:21:13 +00:00
getSupportedTlds(): Promise<string[]>;
2022-08-19 13:57:34 +00:00
}