From dbe35225be623a738b671c726578fabdf095aab7 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 18 Aug 2022 13:02:27 -0400 Subject: [PATCH] *Add types --- package.json | 5 ++++- src/resolverModule.ts | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) 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; }