@types/swipeview

TypeScript definitions for SwipeView

Stats

StarsIssuesVersionUpdatedCreatedSize
@types/swipeview
1.0.304 months ago5 years agoMinified + gzip package size for @types/swipeview in KB

Readme

Installation

npm install --save @types/swipeview

Summary

This package contains type definitions for SwipeView (http://cubiq.org/swipeview).

Details

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

index.d.ts

// Type definitions for SwipeView 1.0
// Project: http://cubiq.org/swipeview
// Definitions by: Boris Yankov <https://github.com/borisyankov>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped


interface SwipeViewEvent {
    (fn: Function): void;
}

interface SwipeViewOptions {
    text?: string | undefined;
    numberOfPages?: number | undefined;
    snapThreshold?: number | undefined;
    hastyPageFlip?: boolean | undefined;
    loop?: boolean | undefined;
}

declare class SwipeView {

    masterPages: HTMLElement[];
    currentMasterPage: number;
    wrapper: HTMLElement;
    slider: HTMLElement;

    constructor (element: string);
    constructor (element: string, options: SwipeViewOptions);

    destroy(): void;
    refreshSize(): void;
    updatePageCount(n: number): void;
    goToPage(p: number): void;
    next(): void;
    prev(): void;
    handleEvent(e: Event): void;
    
    onFlip: SwipeViewEvent;
    onMoveOut: SwipeViewEvent;
    onMoveIn: SwipeViewEvent;
    onTouchStart: SwipeViewEvent;

    wrapperHeight: number;
}

Additional Details

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

Credits

These definitions were written by Boris Yankov.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.