*Update dist

This commit is contained in:
Derrick Hammer 2022-08-19 15:49:56 -04:00
parent cf214c2f43
commit 234074fb8f
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
5 changed files with 49 additions and 37 deletions

View File

@ -1,24 +1,36 @@
import type { DNSResult, ResolverOptions } from "./types.js"; import type { DNSResult, ResolverOptions } from "./types.js";
import { RpcNetwork } from "@lumeweb/dht-rpc-client"; import type { RpcNetwork } from "@lumeweb/dht-rpc-client";
declare class ResolverRegistry { declare class ResolverRegistry {
private _resolvers; private _resolvers;
private _rpcNetwork; private _rpcNetwork;
constructor(network?: RpcNetwork); constructor(network?: RpcNetwork);
get resolvers(): Set<ResolverModule>; get resolvers(): Set<ResolverModule>;
get rpcNetwork(): RpcNetwork; get rpcNetwork(): RpcNetwork;
resolve(domain: string, options?: ResolverOptions, bypassCache?: boolean): Promise<DNSResult>; resolve(
domain: string,
options?: ResolverOptions,
bypassCache?: boolean
): Promise<DNSResult>;
register(resolver: ResolverModule): void; register(resolver: ResolverModule): void;
clear(): void; clear(): void;
} }
export interface ResolverModule { export interface ResolverModule {
constructor(resolver: ResolverRegistry): any; constructor(resolver: ResolverRegistry): any;
resolve(domain: string, options: ResolverOptions, bypassCache: boolean): Promise<DNSResult>; resolve(
domain: string,
options: ResolverOptions,
bypassCache: boolean
): Promise<DNSResult>;
getSupportedTlds(): string[]; getSupportedTlds(): string[];
} }
export declare abstract class AbstractResolverModule { export declare abstract class AbstractResolverModule {
protected resolver: ResolverRegistry; protected resolver: ResolverRegistry;
constructor(resolver: ResolverRegistry); constructor(resolver: ResolverRegistry);
abstract resolve(domain: string, options: ResolverOptions, bypassCache: boolean): Promise<DNSResult>; abstract resolve(
domain: string,
options: ResolverOptions,
bypassCache: boolean
): Promise<DNSResult>;
getSupportedTlds(): string[]; getSupportedTlds(): string[];
isTldSupported(domain: string): boolean; isTldSupported(domain: string): boolean;
} }

View File

@ -1 +1 @@
{"version":3,"file":"resolverModule.d.ts","sourceRoot":"","sources":["../src/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