Neanderthal Painting Monet

    @types/smooth-scroll
    TypeScript icon, indicating that this package has built-in type declarations

    16.1.1 • Public • Published

    Installation

    npm install --save @types/smooth-scroll

    Summary

    This package contains type definitions for smooth-scroll (https://github.com/cferdinandi/smooth-scroll).

    Details

    Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/smooth-scroll.

    index.d.ts

    // Type definitions for smooth-scroll 16.1
    // Project: https://github.com/cferdinandi/smooth-scroll
    // Definitions by: Andrei Horodinca <https://github.com/andreiho>
    //                 grgr-dkrk <https://github.com/grgr-dkrk>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    // TypeScript Version: 2.1
    
    export as namespace SmoothScroll;
    
    export = SmoothScroll;
    
    declare namespace SmoothScroll {
        type Easing =
            | "Linear"
            | "easeInQuad"
            | "easeInCubic"
            | "easeInQuart"
            | "easeInQuint"
            | "easeInOutQuad"
            | "easeInOutCubic"
            | "easeInOutQuart"
            | "easeInOutQuint"
            | "easeOutQuad"
            | "easeOutCubic"
            | "easeOutQuart"
            | "easeOutQuint";
    
        interface Options {
            // Selectors
            ignore?: string | undefined;
            header?: string | undefined;
            topOnEmptyHash?: boolean | undefined;
    
            // Speed & Easing
            speed?: number | undefined;
            speedAsDuration?: boolean | undefined;
            durationMax?: number | null | undefined;
            durationMin?: number | null | undefined;
            clip?: boolean | undefined;
            offset?:
                | number
                | ((
                      anchor?: Element | number | null,
                      toggle?: Element | null
                  ) => number) | undefined;
            easing?: Easing | undefined;
            customEasing?: ((time: number) => number) | undefined;
    
            // History
            updateURL?: boolean | undefined;
            popstate?: boolean | undefined;
    
            // Custom Events
            emitEvents?: boolean | undefined;
        }
    }
    
    declare class SmoothScroll {
        constructor(selector?: string, options?: SmoothScroll.Options);
    
        init(options?: SmoothScroll.Options): void;
    
        destroy(): void;
    
        animateScroll(
            anchor: Element | number | null,
            toggle?: Element | null,
            options?: SmoothScroll.Options
        ): void;
    
        cancelScroll(noEvent?: boolean): void;
    }

    Additional Details

    • Last updated: Tue, 06 Jul 2021 16:35:00 GMT
    • Dependencies: none
    • Global values: SmoothScroll

    Credits

    These definitions were written by Andrei Horodinca, and grgr-dkrk.

    Keywords

    none

    Install

    npm i @types/smooth-scroll

    DownloadsWeekly Downloads

    3,187

    Version

    16.1.1

    License

    MIT

    Unpacked Size

    6.79 kB

    Total Files

    4

    Last publish

    Collaborators

    • types