diff --git a/package.json b/package.json index 6d93821..3b25af6 100644 --- a/package.json +++ b/package.json @@ -2,5 +2,8 @@ "name": "@lumeweb/resolver-common", "version": "0.1.0", "description": "Common code and interfaces for the DNS resolver modules", - "main": "dist/index.js" + "main": "dist/index.js", + "dependencies": { + "@lumeweb/resolver": "https://github.com/LumeWeb/resolver.git#modular" + } } diff --git a/src/resolverModule.ts b/src/resolverModule.ts index 2ab7a8a..bcef82a 100644 --- a/src/resolverModule.ts +++ b/src/resolverModule.ts @@ -1,8 +1,9 @@ import type { DNSResult, ResolverOptions } from "./types.js"; import { getTld } from "./util.js"; +import ResolverRegistry from "@lumeweb/resolver"; export interface ResolverModule { - constructor(resolver: any): void; + constructor(resolver: ResolverRegistry): void; resolve( domain: string, @@ -12,9 +13,9 @@ export interface ResolverModule { } export abstract class AbstractResolverModule { - protected resolver: any; + protected resolver: ResolverRegistry; - constructor(resolver: any) { + constructor(resolver: ResolverRegistry) { this.resolver = resolver; }