From b5d4b63adeba81848fa4052d60928075da0477d4 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 19 Feb 2023 18:18:00 -0500 Subject: [PATCH] *Use function overloading --- src/resolverModule.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/resolverModule.ts b/src/resolverModule.ts index 226f905..506d0c7 100644 --- a/src/resolverModule.ts +++ b/src/resolverModule.ts @@ -44,7 +44,9 @@ export abstract class AbstractResolverModule { return []; } - isTldSupported(domain: string): boolean | Promise { + isTldSupported(domain: string): Promise; + isTldSupported(domain: string): boolean; + isTldSupported(domain: string): any { let supported = this.getSupportedTlds(); if (isPromise(supported as Promise)) { return (supported as Promise).then((supported: string[]) => {