J
J
Jirafek2021-12-11 20:01:06
typescript
Jirafek, 2021-12-11 20:01:06

How to specify type for typescript?

I do noUiSlider on typescript when adding 61b4d92873073493693399.png
it gives such an error Argument of type "{ start: number[]; }" cannot be assigned to parameter of type "Options".
The "range" property is not present in the "{ start: number[]; }" type and is required in the "Options" type.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2021-12-11
@Jirafek

you also need to pass the range property, since it is required.

noUiSlider.create(slider, {
    start: [20, 80],
    connect: true,
    range: {
        'min': 0,
        'max': 100
    }
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question