JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 30850
  • Score
    100M100P100Q137219F
  • License MIT

Typescript definitions for npm registry content

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@npm/types) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    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.