MCPcopy Index your code
hub / github.com/npm/types

github.com/npm/types @v2.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.1.0 ↗ · + Follow
14 symbols 20 edges 6 files 1 documented · 7% 539 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

@npm/types

Typescript definitions for npm registry endpoints

For example:

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.

Extension points exported contracts — how you extend this code

Dist (Interface)
* Dists are properties of Packument.versions * they have all the info you need to download and validate the tarball
types/index.d.ts
Contact (Interface)
(no doc)
types/index.d.ts
Signature (Interface)
(no doc)
types/index.d.ts
Repository (Interface)
(no doc)
types/index.d.ts
Funding (Interface)
(no doc)
types/index.d.ts

Core symbols most depended-on inside this repo

getFixtures
called by 1
test/fixtures.ts
registryFetch
called by 1
test/fixtures.ts

Shape

Interface 12
Function 2

Languages

TypeScript100%

Modules by API surface

types/index.d.ts12 symbols
test/fixtures.ts2 symbols

For agents

$ claude mcp add types \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact