0.18.3 • Published 7 months ago

@types/clusterize.js v0.18.3

Weekly downloads
52
License
MIT
Repository
github
Last release
7 months ago

Installation

npm install --save @types/clusterize.js

Summary

This package contains type definitions for clusterize.js (https://github.com/NeXTs/Clusterize.js).

Details

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

index.d.ts

// Type definitions for clusterize.js 0.18
// Project: https://github.com/NeXTs/Clusterize.js
// Definitions by: Pr1st0n <https://github.com/Pr1st0n>
//                 Goran Jovanovic <https://github.com/gjovanovicst>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

declare class Clusterize {
    constructor(options: Clusterize.Options);

    destroy(clean?: boolean): void;
    refresh(force?: boolean): void;
    clear(): void;
    getRowsAmount(): number;
    getScrollProgress(): number;
    update(data?: string[]): void;
    append(rows: string[]): void;
    prepend(rows: string[]): void;
}

declare namespace Clusterize {
    type Setup = { scrollId: string; contentId: string } | { scrollElem: HTMLElement; contentElem: HTMLElement };

    type Options = Setup & {
        rows?: string[] | undefined;
        tag?: string | undefined;
        rows_in_block?: number | undefined;
        blocks_in_cluster?: number | undefined;
        show_no_data_row?: boolean | undefined;
        no_data_text?: string | undefined;
        no_data_class?: string | undefined;
        keep_parity?: boolean | undefined;
        callbacks?: Callbacks | undefined;
    };

    interface Callbacks {
        clusterWillChange?: (() => void) | undefined;
        clusterChanged?: (() => void) | undefined;
        scrollingProgress?: ((progress: number) => void) | undefined;
    }
}

export = Clusterize;

Additional Details

  • Last updated: Thu, 08 Jul 2021 09:07:59 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Pr1st0n, and Goran Jovanovic.

0.18.2

7 months ago

0.18.3

7 months ago

0.18.1

3 years ago

0.18.0

3 years ago

0.17.1

5 years ago

0.17.0

7 years ago