*import only the type RpcNetwork
This commit is contained in:
parent
09a5a605a7
commit
7a1a2d2150
|
@ -1,23 +1,22 @@
|
||||||
import type { DNSResult, ResolverOptions } from "./types.js";
|
import type { DNSResult, ResolverOptions } from "./types.js";
|
||||||
import { getTld } from "./util.js";
|
import { getTld } from "./util.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(
|
resolve(
|
||||||
domain: string,
|
domain: string,
|
||||||
options?: ResolverOptions,
|
options?: ResolverOptions,
|
||||||
bypassCache?: boolean
|
bypassCache?: boolean
|
||||||
): Promise<DNSResult>;
|
): Promise<DNSResult>;
|
||||||
register(resolver: ResolverModule): void;
|
register(resolver: ResolverModule): void;
|
||||||
clear(): void;
|
clear(): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export interface ResolverModule {
|
export interface ResolverModule {
|
||||||
constructor(resolver: ResolverRegistry);
|
constructor(resolver: ResolverRegistry);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue