Compare commits

..

2 Commits

Author SHA1 Message Date
Derrick Hammer 0fa39b7a6b
*Update dist 2023-02-19 18:20:17 -05:00
Derrick Hammer b5d4b63ade
*Use function overloading 2023-02-19 18:18:00 -05:00
3 changed files with 6 additions and 3 deletions

View File

@ -29,7 +29,8 @@ export declare abstract class AbstractResolverModule {
bypassCache: boolean bypassCache: boolean
): Promise<DNSResult>; ): Promise<DNSResult>;
getSupportedTlds(): string[] | Promise<string[]>; getSupportedTlds(): string[] | Promise<string[]>;
isTldSupported(domain: string): boolean | Promise<boolean>; isTldSupported(domain: string): Promise<boolean>;
isTldSupported(domain: string): boolean;
} }
export {}; export {};
//# sourceMappingURL=resolverModule.d.ts.map //# sourceMappingURL=resolverModule.d.ts.map

View File

@ -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,EAAE,OAAO,GACpB,OAAO,CAAC,SAAS,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI;IACxC,KAAK,IAAI,IAAI;CACd;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,QAAQ,EAAE,gBAAgB,OAAE;CAClC;AAED,MAAM,WAAW,cAAe,SAAQ,yBAAyB;IAC/D,OAAO,CACL,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,SAAS,CAAC,CAAC;IAEtB,gBAAgB,IAAI,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,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Q,EAAE,gBAAgB,CAAC;gBAEzB,QAAQ,EAAE,gBAAgB;IAItC,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,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAIhD,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAChD,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;CAWxC"}

View File

@ -44,7 +44,9 @@ export abstract class AbstractResolverModule {
return []; return [];
} }
isTldSupported(domain: string): boolean | Promise<boolean> { isTldSupported(domain: string): Promise<boolean>;
isTldSupported(domain: string): boolean;
isTldSupported(domain: string): any {
let supported = this.getSupportedTlds(); let supported = this.getSupportedTlds();
if (isPromise(supported as Promise<string[]>)) { if (isPromise(supported as Promise<string[]>)) {
return (supported as Promise<string[]>).then((supported: string[]) => { return (supported as Promise<string[]>).then((supported: string[]) => {