*Cast supported due to overload
This commit is contained in:
parent
6973f7218b
commit
68640a2bb8
|
@ -51,8 +51,8 @@ export abstract class AbstractResolverModule {
|
||||||
isTldSupported(domain: string): Promise<boolean>;
|
isTldSupported(domain: string): Promise<boolean>;
|
||||||
isTldSupported(domain: string): boolean;
|
isTldSupported(domain: string): boolean;
|
||||||
isTldSupported(domain: string): any {
|
isTldSupported(domain: string): any {
|
||||||
let supported = this.getSupportedTlds();
|
let supported = this.getSupportedTlds() as any;
|
||||||
if (isPromise(supported as Promise<string[]>)) {
|
if (isPromise(supported)) {
|
||||||
return (supported as Promise<string[]>).then((supported: string[]) => {
|
return (supported as Promise<string[]>).then((supported: string[]) => {
|
||||||
return supported.includes(getTld(domain));
|
return supported.includes(getTld(domain));
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue