@types/bintrees
TypeScript definitions for bintrees
Last updated 5 years ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @types/bintrees 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/bintrees

Summary

This package contains type definitions for bintrees (https://github.com/vadimg/js_bintrees).

Details

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

index.d.ts

declare module "bintrees" {
    type Callback<T> = (item: T) => void;
    type Comparator<T> = (a: T, b: T) => number;

    class Iterator<T> {
        constructor(tree: TreeBase<T>);

        data(): T | null;

        next(): T | null;

        prev(): T | null;
    }

    class TreeBase<T> {
        size: number;

        clear(): void;

        find(data: T): T | null;

        findIter(data: T): Iterator<T> | null;

        lowerBound(item: T): Iterator<T>;

        upperBound(item: T): Iterator<T>;

        min(): T | null;

        max(): T | null;

        iterator(): Iterator<T>;

        each(cb: Callback<T>): void;

        reach(cb: Callback<T>): void;
    }

    export class RBTree<T> extends TreeBase<T> {
        constructor(comparator: Comparator<T>);

        insert(item: T): boolean;

        remove(item: T): boolean;
    }

    export class BinTree<T> extends TreeBase<T> {
        constructor(comparator: Comparator<T>);

        insert(item: T): boolean;

        remove(item: T): boolean;
    }
}

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:04 GMT
  • Dependencies: none

Credits

These definitions were written by Cayle Sharrock.

Current Tags

  • 1.0.6                                ...           latest (2 years ago)
  • 1.0.2                                ...           ts2.0 (9 years ago)
  • 1.0.2                                ...           ts2.1 (9 years ago)
  • 1.0.2                                ...           ts2.2 (9 years ago)
  • 1.0.2                                ...           ts2.3 (9 years ago)
  • 1.0.2                                ...           ts2.4 (9 years ago)
  • 1.0.2                                ...           ts2.5 (9 years ago)
  • 1.0.2                                ...           ts2.6 (9 years ago)
  • 1.0.2                                ...           ts2.7 (9 years ago)
  • 1.0.2                                ...           ts2.8 (9 years ago)
  • 1.0.2                                ...           ts2.9 (9 years ago)
  • 1.0.2                                ...           ts3.0 (9 years ago)
  • 1.0.2                                ...           ts3.1 (9 years ago)
  • 1.0.2                                ...           ts3.2 (9 years ago)
  • 1.0.2                                ...           ts3.3 (9 years ago)
  • 1.0.3                                ...           ts3.4 (5 years ago)
  • 1.0.3                                ...           ts3.5 (5 years ago)
  • 1.0.3                                ...           ts3.6 (5 years ago)
  • 1.0.3                                ...           ts3.7 (5 years ago)
  • 1.0.3                                ...           ts3.8 (5 years ago)
  • 1.0.3                                ...           ts3.9 (5 years ago)
  • 1.0.3                                ...           ts4.0 (5 years ago)
  • 1.0.3                                ...           ts4.1 (5 years ago)
  • 1.0.3                                ...           ts4.2 (5 years ago)
  • 1.0.3                                ...           ts4.3 (5 years ago)
  • 1.0.3                                ...           ts4.4 (5 years ago)
  • 1.0.6                                ...           ts4.5 (2 years ago)
  • 1.0.6                                ...           ts4.6 (2 years ago)
  • 1.0.6                                ...           ts4.7 (2 years ago)
  • 1.0.6                                ...           ts4.8 (2 years ago)
  • 1.0.6                                ...           ts4.9 (2 years ago)
  • 1.0.6                                ...           ts5.0 (2 years ago)
  • 1.0.6                                ...           ts5.1 (2 years ago)
  • 1.0.6                                ...           ts5.2 (2 years ago)
  • 1.0.6                                ...           ts5.3 (2 years ago)
  • 1.0.6                                ...           ts5.4 (2 years ago)
  • 1.0.6                                ...           ts5.5 (2 years ago)

7 Versions

  • 1.0.6                                ...           2 years ago
  • 1.0.5                                ...           2 years ago
  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           5 years ago
  • 1.0.2                                ...           9 years ago
  • 1.0.1                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |