*Add types
This commit is contained in:
parent
d6b581819f
commit
dbe35225be
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue