# @types/hashtable

> TypeScript definitions for hashtable

Latest version **3.0.33** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/hashtable
pnpm add @types/hashtable
yarn add @types/hashtable
bun add @types/hashtable
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 3.0.33 |
| Published | 2023-11-07 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51437 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/hashtable
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hashtable
- npm.io page: https://npm.io/package/@types/hashtable

## Recent versions

- 3.0.33 (latest) — 2023-11-07
- 3.0.30 (ts3.6) — 2021-07-08
- 3.0.29 (ts3.0) — 2020-05-15
- 3.0.28 (ts2.0) — 2016-09-19
- 3.0.32 — 2023-10-18
- 3.0.31 — 2023-09-16
- 3.0.27 — 2016-07-14
- 3.0.26-alpha — 2016-07-08
- 3.0.25-alpha — 2016-07-04
- 3.0.24-alpha — 2016-07-02
- 3.0.23-alpha — 2016-07-01
- 3.0.22-alpha — 2016-07-01
- 3.0.21-alpha — 2016-05-25
- 3.0.20-alpha — 2016-05-20
- 3.0.15-alpha — 2016-05-19
- … 1 more at https://npm.io/package/@types/hashtable/versions

## README

# Installation
> `npm install --save @types/hashtable`

# Summary
This package contains type definitions for hashtable (http://www.timdown.co.uk/jshashtable/).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hashtable.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hashtable/index.d.ts)
````ts
interface IHashtable<TKey, TValue> {
    put(key: TKey, value: TValue): TValue;
    putAll(
        hashtable: IHashtable<TKey, TValue>,
        conflictCallback?: (key: TKey, thisValue: TValue, value: TValue) => TValue,
    ): void;

    get(key: TKey): TValue;
    containsKey(key: TKey): boolean;
    containsValue(value: TValue): boolean;

    clear(): void;
    isEmpty(): boolean;

    keys(): TKey[];
    values(): TValue[];
    entries(): any[][];

    remove(key: TKey): TValue;
    size(): number;

    clone(): IHashtable<TKey, TValue>;
    each(callback: (key: TKey, value: TValue) => void): void;

    equals(hashtable: IHashtable<TKey, TValue>): boolean;
    toQueryString(): string;
}

interface IHashtableOptions<TKey> {
    hashCode?: ((key: TKey) => any) | undefined;
    equals?: ((key1: TKey, key2: TKey) => boolean) | undefined;
    replaceDuplicateKey?: boolean | undefined;
}

interface IHashtableStatic {
    new<TKey, TValue>(): IHashtable<TKey, TValue>;
    new<TKey, TValue>(options: IHashtableOptions<TKey>): IHashtable<TKey, TValue>;
    new<TKey, TValue>(
        hashCode?: (value: TValue) => any,
        equals?: (value1: TValue, value2: TValue) => boolean,
    ): IHashtable<TKey, TValue>;
}

declare var Hashtable: IHashtableStatic;

declare module "hashtable" {
    export = Hashtable;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
 * Dependencies: none

# Credits
These definitions were written by [Sergey Gerasimov](https://github.com/gerich-home).

---
_Source: https://npm.io/package/@types/hashtable · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
