From 96e3b950fc019a16501ac60eb2165b564b1f7754 Mon Sep 17 00:00:00 2001 From: GrinVyach Date: Wed, 6 Dec 2023 12:47:58 +0600 Subject: [PATCH] fix type errors --- index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.ts b/index.ts index c1e1ddd..ac84523 100644 --- a/index.ts +++ b/index.ts @@ -21,8 +21,8 @@ const getIPv6 = (ip: string): Address6 | null => { } }; -const getRangev4 = (ip1: string, ip2: string) => { - const ips = []; +const getRangev4 = (ip1: string, ip2: string): string[] => { + const ips: string[] = []; let firstAddressLong = toLong(ip1); const lastAddressLong = toLong(ip2); @@ -40,8 +40,8 @@ const getRangev4 = (ip1: string, ip2: string) => { return ips; }; -const getRangev6 = (ip1: string, ip2: string) => { - const ips = []; +const getRangev6 = (ip1: string, ip2: string): string[] => { + const ips: string[] = []; const firstAddress = new Address6(ip1); const lastAddress = new Address6(ip2);