# @npm/types

> Typescript definitions for npm registry content

Latest version **2.1.0** (published 2025-04-28) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; has provenance; high quality score.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2025-04-28 |
| First published | 2018-08-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=18.6.0 |
| Dependencies | 0 |
| Unpacked size | 9.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 39 |
| Author | GitHub Inc. |
| Maintainers | fritzy, npm, npmci, saquibkhan, gar, tayvongh, karenjli, jumoel, monishcm, nishantms, kartykp, shmam, reggi, jithinpg, dhei, maitxn, hashtagchris, owlstronaut |
| Keywords | npm registry, types, typescript, definitions, typings |

## Links

- npm: https://www.npmjs.com/package/@npm/types
- Repository: https://github.com/npm/types
- Homepage: https://github.com/npm/types#readme
- Issues: https://github.com/npm/types/issues
- npm.io page: https://npm.io/package/@npm/types

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 2.1.0 (latest) — 2025-04-28
- 2.0.0 — 2024-08-13
- 1.0.2 — 2022-05-06
- 1.0.1 — 2018-08-31
- 1.0.0 — 2018-08-31

## README

# @npm/types

Typescript definitions for npm registry endpoints

For example:

```typescript
import * as npm from '@npm/types';

fetch('https://registry.npmjs.org/cookie')
  .then((res) => res.json())
  .then((obj: npm.Packument) => {
    // `obj` has proper registry types!
  })
```

## Types

### Packument
Response type for the `https://registry.npmjs.org/:packageName` endpoint

### PackumentVersion
Response type for the `https://registry.npmjs.org/:packageName/:packageVersion` endpoint.  Also the type of `Packument['versions']` entries.

### Manifest
Response type for the `https://registry.npmjs.org/:packageName` endpoint, _when made with the 'Accept: application/vnd.npm.install-v1+json' header_.

### ManifestVersion
Response type for the `https://registry.npmjs.org/:packageName/:packageVersion` endpoint, _when made with the 'Accept: application/vnd.npm.install-v1+json' header_.   Also the type of `Manifest['versions']` entries.

### PackageJSON
A "loose" definition of package.json structures.

> [!NOTE]
> This is not an authoritative definition of package.json structures.  Rather, it is a best-effort attempt to describe the fields that are de-facto standards for Node.js, npm, and TypeScript development.

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