*Use function overloading

This commit is contained in:
Derrick Hammer 2023-02-19 18:18:00 -05:00
parent 1551e0aa75
commit b5d4b63ade
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 1 deletions

View File

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