Socket
Book a DemoInstallSign in
Socket

@npm/types

Package Overview
Dependencies
Maintainers
18
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@npm/types

Typescript definitions for npm registry content

latest
Source
npmnpm
Version
2.1.0
Version published
Maintainers
18
Created
Source

@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.

Keywords

npm registry

FAQs

Package last updated on 28 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts