noUiSlider icon indicating copy to clipboard operation
noUiSlider copied to clipboard

type error in Range in latest version

Open MMT-LD opened this issue 1 year ago • 1 comments

Hey!

i updated to 15.6.1 and since then i receive the below error.

Type '{ min: [number]; '10%': number[]; '50%': number[]; max: [number]; }' is not assignable to type 'Range'.
  Object literal may only specify known properties, and ''10%'' does not exist in type 'Range'.ts(2322)
nouislider.d.ts(112, 5): The expected type comes from property 'range' which is declared here on type 'Options'

Reverting to previous version fixes this issue for me.

i'm using 4.1.2 typescript. We can't upgrade this yet. Thought i would let you know.

MMT-LD avatar Aug 16 '22 08:08 MMT-LD

This type of template literal is supported from TypeScript 4.4 and was added as the type for the key in Range in #1218. I'm looking into what I can do to annotate this.

leongersen avatar Aug 17 '22 18:08 leongersen