2.0.31 • Published 6 months ago

@types/swipe v2.0.31

Weekly downloads
7,950
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/swipe

Summary

This package contains type definitions for Swipe (https://github.com/thebird/Swipe).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/swipe.

index.d.ts

// Type definitions for Swipe 2.0
// Project: https://github.com/thebird/Swipe
// Definitions by: Andrey Kurdyumov <https://github.com/kant2002>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped


interface SwipeOptions {
    startSlide?: number | undefined;
    speed?: number | undefined;
    auto?: number | undefined;
    continuous?: boolean | undefined;
    disableScroll?: boolean | undefined;
    stopPropagation?: boolean | undefined;
    callback?: ((index: number, elem: HTMLElement) => void) | undefined;
    transitionEnd?: ((index: number, elem: HTMLElement) => void) | undefined;
}

declare class Swipe {
    constructor(container: HTMLElement, options?: SwipeOptions);
    prev(): void;
    next(): void;
    getPos(): number;
    getNumSlides(): number;
    kill(): void;
    attachEvents(): void;
    setup(): void;
    slide(index: number, duration: number): void;
}

Additional Details

  • Last updated: Fri, 02 Jul 2021 22:33:19 GMT
  • Dependencies: none
  • Global values: Swipe

Credits

These definitions were written by Andrey Kurdyumov.