@types/clusterize.js
TypeScript icon, indicating that this package has built-in type declarations

0.18.3 • Public • Published

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

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: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: none

Credits

These definitions were written by Pr1st0n, and Goran Jovanovic.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @types/clusterize.js

      Weekly Downloads

      159

      Version

      0.18.3

      License

      MIT

      Unpacked Size

      5.03 kB

      Total Files

      5

      Last publish

      Collaborators

      • types