Compare commits
2 Commits
68640a2bb8
...
cc8a889bfc
Author | SHA1 | Date |
---|---|---|
Derrick Hammer | cc8a889bfc | |
Derrick Hammer | f4283e2d8f |
|
@ -9,10 +9,7 @@ declare class ResolverRegistry {
|
||||||
register(resolver: ResolverModule): void;
|
register(resolver: ResolverModule): void;
|
||||||
clear(): void;
|
clear(): void;
|
||||||
}
|
}
|
||||||
export interface ResolverModuleConstructor {
|
export interface ResolverModule {
|
||||||
new (resolver: ResolverRegistry): any;
|
|
||||||
}
|
|
||||||
export interface ResolverModule extends ResolverModuleConstructor {
|
|
||||||
resolve(
|
resolve(
|
||||||
domain: string,
|
domain: string,
|
||||||
options: ResolverOptions,
|
options: ResolverOptions,
|
||||||
|
@ -23,8 +20,10 @@ export interface ResolverModule extends ResolverModuleConstructor {
|
||||||
getSupportedTlds(): any;
|
getSupportedTlds(): any;
|
||||||
}
|
}
|
||||||
export declare abstract class AbstractResolverModule {
|
export declare abstract class AbstractResolverModule {
|
||||||
protected resolver: ResolverRegistry;
|
constructor(resolver?: ResolverRegistry);
|
||||||
constructor(resolver: ResolverRegistry);
|
private _resolver?;
|
||||||
|
get resolver(): ResolverRegistry;
|
||||||
|
set resolver(value: ResolverRegistry);
|
||||||
abstract resolve(
|
abstract resolve(
|
||||||
domain: string,
|
domain: string,
|
||||||
options: ResolverOptions,
|
options: ResolverOptions,
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"resolverModule.d.ts","sourceRoot":"","sources":["../src/resolverModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAG7D,OAAO,OAAO,gBAAgB;IAC5B,IAAI,SAAS,IAAI,GAAG,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC;IACpE,OAAO,CACL,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,eAAe,EACzB,WAAW,CAAC,EAA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CAAC,EAAE,eAAe,EACzB,WAAW,CAAC,EAAE,OAAO,GACpB,OAAO,CAAC,SAAS,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI;IACxC,KAAK,IAAI,IAAI;CACd;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,CACL,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,SAAS,CAAC,CAAC;IAEtB,gBAAgB,IAAI,MAAM,EAAE,CAAC;IAC7B,gBAAgB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACtC,gBAAgB,IAAI,GAAG,CAAC;CACzB;AAGD,8BAAsB,sBAAsB;gBAC9B,QAAQ,CAAC,EAAE,gBAAgB;IAIvC,OAAO,CAAC,SAAS,CAAC,CAAmB;IAErC,IAAI,QAAQ,IAAI,gBAAgB,CAE/B;IAED,IAAI,QAAQ,CAAC,KAAK,EAAE,gBAAgB,EAEnC;IAED,QAAQ,CAAC,OAAO,CACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,SAAS,CAAC;IAErB,gBAAgB,IAAI,MAAM,EAAE;IAC5B,gBAAgB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAKrC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAChD,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;CAWxC"}
|
|
@ -1,9 +1,15 @@
|
||||||
import { getTld, isPromise } from "./util.js";
|
import { getTld, isPromise } from "./util.js";
|
||||||
// ts-ignore
|
// ts-ignore
|
||||||
export class AbstractResolverModule {
|
export class AbstractResolverModule {
|
||||||
resolver;
|
|
||||||
constructor(resolver) {
|
constructor(resolver) {
|
||||||
this.resolver = resolver;
|
this._resolver = resolver;
|
||||||
|
}
|
||||||
|
_resolver;
|
||||||
|
get resolver() {
|
||||||
|
return this._resolver;
|
||||||
|
}
|
||||||
|
set resolver(value) {
|
||||||
|
this._resolver = value;
|
||||||
}
|
}
|
||||||
getSupportedTlds() {
|
getSupportedTlds() {
|
||||||
return [];
|
return [];
|
||||||
|
|
|
@ -12,11 +12,7 @@ declare class ResolverRegistry {
|
||||||
clear(): void;
|
clear(): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ResolverModuleConstructor {
|
export interface ResolverModule {
|
||||||
new (resolver: ResolverRegistry);
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ResolverModule extends ResolverModuleConstructor {
|
|
||||||
resolve(
|
resolve(
|
||||||
domain: string,
|
domain: string,
|
||||||
options: ResolverOptions,
|
options: ResolverOptions,
|
||||||
|
@ -30,10 +26,18 @@ export interface ResolverModule extends ResolverModuleConstructor {
|
||||||
|
|
||||||
// ts-ignore
|
// ts-ignore
|
||||||
export abstract class AbstractResolverModule {
|
export abstract class AbstractResolverModule {
|
||||||
protected resolver: ResolverRegistry;
|
constructor(resolver?: ResolverRegistry) {
|
||||||
|
this._resolver = resolver;
|
||||||
|
}
|
||||||
|
|
||||||
constructor(resolver: ResolverRegistry) {
|
private _resolver?: ResolverRegistry;
|
||||||
this.resolver = resolver;
|
|
||||||
|
get resolver(): ResolverRegistry {
|
||||||
|
return this._resolver as ResolverRegistry;
|
||||||
|
}
|
||||||
|
|
||||||
|
set resolver(value: ResolverRegistry) {
|
||||||
|
this._resolver = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract resolve(
|
abstract resolve(
|
||||||
|
|
Loading…
Reference in New Issue