# tsdjs/tsd

Check TypeScript type definitions

Repository: https://github.com/tsdjs/tsd
Canonical: https://ross.abutalabs.com/products/tsd
Language: TypeScript
License: MIT
License Family: permissive
Last push: 2025-08-05T11:56:46+00:00

## Health v2 (maintenance only)
Score: 42/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 35, release rhythm 17, longevity 100
- inputs: {"age_days": 2927, "days_push": 393, "days_rel": 393, "gap_med": 166.5, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2557, forks 68 (observed 2026-08-28T04:07:00.784911+00:00)

## What it is
tsd is a CLI tool and library for testing TypeScript type definitions (.d.ts files). It statically analyzes .test-d.ts files containing assertion constructs like expectType and expectError to verify that type definitions behave as intended.

## Use cases
- test my package's .d.ts type definitions
- assert that a function returns an exact TypeScript type
- verify that invalid code produces a type error
- catch regressions in typings before publishing to npm
- run type-level tests in CI

## When to choose
- you publish an npm package with TypeScript typings and want to test them
- you need strict type assertions like expectType or expectError
- you want type tests integrated into CI without executing code

## When to avoid
- you need runtime unit tests rather than type-level checks
- you want type testing built into the TypeScript compiler itself (consider vitest expectTypeOf or tstyche)
- your project does not ship type definitions

## Facets
- artifact type: cli-tool
- maturity: active
- function: testing, type-system, cli, developer-tools
- domain: developer-tools, testing, programming-languages
- platform: cli, cross-platform
- tags: typescript, type-definitions, type-testing, dts-files, static-analysis, nodejs

## Member repositories
- tsdjs/tsd (main) score 42

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:00.784911+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-30T02:23:39.177260+00:00, confidence not recorded.
  - readme: https://github.com/tsdjs/tsd (fetched 2026-08-28T04:07:00.784911+00:00, sha 71c4ad4483dc)
  - registry_npm: https://registry.npmjs.org/tsd (fetched 2026-08-29T10:06:27.411943+00:00, sha 55d018a2a67a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
