Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add getPositions to API Types #1270

Closed
jwerre opened this issue May 10, 2024 · 1 comment
Closed

Add getPositions to API Types #1270

jwerre opened this issue May 10, 2024 · 1 comment

Comments

@jwerre
Copy link

jwerre commented May 10, 2024

I'm getting the following type error when I try to use getPositions.

Property 'getPositions' does not exist on type 'API'.

To fix this we need to add getPositions to the API interface like so:

export interface API {
   getPositions: () => number[]; // <----- ADD THIS LINE;
    destroy: () => void;
    steps: () => NextStepsForHandle[];
    on: (eventName: string, callback: EventCallback) => void;
    off: (eventName: string) => void;
    get: (unencoded?: boolean) => GetResult;
    set: (input: number | string | (number | string)[], fireSetEvent?: boolean, exactInput?: boolean) => void;
    setHandle: (handleNumber: number, value: number | string, fireSetEvent?: boolean, exactInput?: boolean) => void;
    reset: (fireSetEvent?: boolean) => void;
    disable: (handleNumber?: number) => void;
    enable: (handleNumber?: number) => void;
    options: Options;
    updateOptions: (optionsToUpdate: UpdatableOptions, fireSetEvent: boolean) => void;
    target: HTMLElement;
    removePips: () => void;
    removeTooltips: () => void;
    getTooltips: () => { [handleNumber: number]: HTMLElement | false };
    getOrigins: () => { [handleNumber: number]: HTMLElement };
    pips: (grid: Pips) => HTMLElement;
}
@leongersen
Copy link
Owner

Thanks, you are quite right. I've update the types in noUiSlider 15.7.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants