# basarat/typescript-collections

A generically typed set of collections for use with TypeScript

Repository: https://github.com/basarat/typescript-collections
Canonical: https://ross.abutalabs.com/products/typescript-collections
Language: TypeScript
License: MIT
License Family: permissive
Last push: 2023-01-12T08:48:56+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4864, "days_push": 1329, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1206, forks 153 (observed 2026-08-28T04:03:59.327556+00:00)

## What it is
A complete, fully tested data structure library written in TypeScript with generic typing. It provides classic collections such as linked lists, dictionaries, binary search trees, stacks, queues, sets, bags, heaps, and priority queues, plus array utility functions.

## Use cases
- use typed dictionaries and sets in TypeScript
- need a priority queue or binary heap in a TypeScript project
- replace plain JS objects with strongly typed collections
- use data structures in both Node.js and the browser
- get intellisense-checked collection element types

## When to choose
- you want generic, compiler-checked data structures in TypeScript
- you need common structures like BST, heap, queue, or multi-dictionary out of the box
- you want a small MIT-licensed dependency usable via npm or UMD script tag

## When to avoid
- you need high-performance or immutable/persistent data structures
- your project uses modern JS without TypeScript and doesn't benefit from generics
- you need structures beyond the included set, like graphs or tries

## Facets
- artifact type: library
- maturity: maintenance
- function: developer-tools
- domain: developer-tools, programming-languages
- platform: browser, cross-platform
- tags: data-structures, typescript, collections, generics, npm-package, algorithms, nodejs

## Member repositories
- basarat/typescript-collections (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:59.327556+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:19:16.910932+00:00, confidence not recorded.
  - readme: https://github.com/basarat/typescript-collections (fetched 2026-08-28T04:03:59.327556+00:00, sha 8636e5bd1ccb)
  - registry_npm: https://registry.npmjs.org/typescript-collections (fetched 2026-08-29T12:27:03.696745+00:00, sha 303d11e4c35e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
