# microsoft/dts-gen

dts-gen creates starter TypeScript definition files for any module or library.

Repository: https://github.com/microsoft/dts-gen
Canonical: https://ross.abutalabs.com/products/dts-gen
Language: TypeScript
License: MIT
License Family: permissive
Archived: true
Last push: 2023-12-15T20:02:03+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3660, "days_push": 992, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2417, forks 97 (observed 2026-08-28T04:06:50.423616+00:00)

## What it is
dts-gen is a CLI tool that generates starter TypeScript definition (.d.ts) files for any JavaScript module or library by inspecting its runtime exports. It is now maintained as part of microsoft/DefinitelyTyped-tools.

## Use cases
- generate a starter .d.ts file for an untyped npm package
- bootstrap type definitions before contributing to DefinitelyTyped
- scaffold declaration files for internal JavaScript libraries
- inspect a module's exported API shape to write types manually
- convert a plain JavaScript package into something TypeScript-friendly

## When to choose
- you need a quick skeleton of type declarations for a JavaScript module
- you are preparing a @types package for DefinitelyTyped
- you want to see the runtime shape of a module's exports before typing it

## When to avoid
- the package already ships its own TypeScript definitions
- you need full-featured type inference rather than a starter template
- you want a tool with active standalone development, since it has moved into DefinitelyTyped-tools

## Facets
- artifact type: cli-tool
- maturity: maintenance
- function: developer-tools, type-system, cli
- domain: developer-tools, programming-languages, documentation
- platform: cli, cross-platform
- tags: typescript, type-definitions, definitelytyped, code-generation, nodejs

## Member repositories
- microsoft/dts-gen (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:50.423616+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:33:08.000864+00:00, confidence not recorded.
  - readme: https://github.com/microsoft/dts-gen (fetched 2026-08-28T04:06:50.423616+00:00, sha e15643e28dbb)
- Data as of 2026-08-30T08:39:29.467469+00:00.
