From c61ad53934afd22b11d9ae05d88070ade3332704 Mon Sep 17 00:00:00 2001 From: Nick Silvestri Date: Mon, 10 Apr 2023 12:46:17 -0400 Subject: [PATCH] Fix incorrect type definition for Range The function represented by Range should return a Color, not a number. Fixes #298. --- types/src/interpolation.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/src/interpolation.d.ts b/types/src/interpolation.d.ts index e50b35762..001f64abc 100644 --- a/types/src/interpolation.d.ts +++ b/types/src/interpolation.d.ts @@ -2,7 +2,7 @@ import Color, { ColorTypes } from "./color"; import ColorSpace from "./space"; import { Methods } from "./deltaE/index"; -export type Range = ((percentage: number) => number) & { +export type Range = ((percentage: number) => Color) & { rangeArgs: { colors: [Color, Color]; options: Record }; };