Skip to content

types-node

Build npm version

TypeScript type definitions for package.json manifests and package data structures. This package exists to break circular dependencies between rnx-kit packages that share these types.

Terminal window
yarn add @rnx-kit/types-node --dev

or if you’re using npm

Terminal window
npm add --save-dev @rnx-kit/types-node
import type { PackageManifest, PackageData } from "@rnx-kit/types-node";

Comprehensive type definitions for package.json files, including all standard npm fields plus the rnx-kit configuration field (typed as KitConfig from @rnx-kit/types-kit-config).

Covers identity and metadata (name, version, license, author), entry points (main, module, types, exports), dependencies, scripts, engines, workspaces, and more.

Data structure representing a package’s location and manifest.

Name Type Description
root string Directory path for the package.json file.
manifest T Parsed package manifest.

A record mapping export paths to string entry points or ExportsGroup objects.

Conditional export map with types, import, require, and default fields.

A package author or contributor, either as a string or a PersonEntry object with name, email, and url fields.

A funding source, either as a URL string or an object with type and url.