From f899a4783e0cd394ea73cd633523d22862ed7c75 Mon Sep 17 00:00:00 2001 From: Jack Domleo <43371432+jackdomleo7@users.noreply.github.com> Date: Fri, 12 Aug 2022 17:05:02 +0100 Subject: [PATCH] Improve type for custom range value (#1218) --- package-lock.json | 2 +- src/nouislider.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index fb391fe..eb5295b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "nouislider", - "version": "15.5.1", + "version": "15.6.0", "license": "MIT", "devDependencies": { "@typescript-eslint/eslint-plugin": "^5.10", diff --git a/src/nouislider.ts b/src/nouislider.ts index 727b0ef..c7dec07 100644 --- a/src/nouislider.ts +++ b/src/nouislider.ts @@ -70,7 +70,7 @@ type SubRange = number | WrappedSubRange; interface Range { min: SubRange; max: SubRange; - [key: string]: SubRange; + [key: `${number}%`]: SubRange; } //region Pips