From d176f2f517ea9a5ac7b80b7da9a45f55ef478c06 Mon Sep 17 00:00:00 2001 From: jobo322 Date: Tue, 12 Nov 2024 04:52:43 -0500 Subject: [PATCH] chore: extends input type in zonesWithPoints --- src/zones/zonesWithPoints.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/zones/zonesWithPoints.ts b/src/zones/zonesWithPoints.ts index e36092f8..6c806cf7 100644 --- a/src/zones/zonesWithPoints.ts +++ b/src/zones/zonesWithPoints.ts @@ -16,7 +16,7 @@ export interface ZonesWithPointsOptions { to?: number; } -export interface FromToWithNumberOfPoints extends FromTo { +export interface ZoneWithNumberOfPoints extends FromTo { numberOfPoints: number; } @@ -27,8 +27,8 @@ export interface FromToWithNumberOfPoints extends FromTo { * @param options - options * @returns array of zones with points */ -export function zonesWithPoints( - zones: FromTo[] = [], +export function zonesWithPoints( + zones: Zone[] = [], /** * total number of points to distribute between zones @@ -36,10 +36,10 @@ export function zonesWithPoints( */ numberOfPoints = 10, options: ZonesWithPointsOptions = {}, -): FromToWithNumberOfPoints[] { +): ZoneWithNumberOfPoints[] { if (zones.length === 0) return []; const normalizedZones = zonesNormalize(zones, options); - const zonesWithNumberOfPoints: FromToWithNumberOfPoints[] = []; + const zonesWithNumberOfPoints: ZoneWithNumberOfPoints[] = []; const totalSize = normalizedZones.reduce((previous, current) => { return previous + (current.to - current.from);