*Update types
This commit is contained in:
parent
3b3e70af21
commit
42712a51d7
|
@ -1,9 +1,10 @@
|
||||||
|
// @ts-nocheck
|
||||||
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 { ResolverRegistry } from "@lumeweb/resolver";
|
import { ResolverRegistry } from "@lumeweb/resolver";
|
||||||
|
|
||||||
export interface ResolverModule {
|
export interface ResolverModule {
|
||||||
constructor(resolver: ResolverRegistry): void;
|
new (resolver: ResolverRegistry): any;
|
||||||
|
|
||||||
resolve(
|
resolve(
|
||||||
domain: string,
|
domain: string,
|
||||||
|
@ -14,11 +15,13 @@ export interface ResolverModule {
|
||||||
getSupportedTlds(): string[];
|
getSupportedTlds(): string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ts-ignore
|
||||||
export abstract class AbstractResolverModule implements ResolverModule {
|
export abstract class AbstractResolverModule implements ResolverModule {
|
||||||
protected resolver: ResolverRegistry;
|
protected resolver: ResolverRegistry;
|
||||||
|
|
||||||
constructor(resolver: ResolverRegistry) {
|
constructor(resolver: ResolverRegistry) {
|
||||||
this.resolver = resolver;
|
this.resolver = resolver;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract resolve(
|
abstract resolve(
|
||||||
|
|
|
@ -15,7 +15,8 @@
|
||||||
"declarationMap": true,
|
"declarationMap": true,
|
||||||
"declarationDir": "dist",
|
"declarationDir": "dist",
|
||||||
"emitDeclarationOnly": false,
|
"emitDeclarationOnly": false,
|
||||||
"allowJs": true
|
"allowJs": true,
|
||||||
|
"noImplicitAny": false
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src"
|
"src"
|
||||||
|
|
Loading…
Reference in New Issue