types-node
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.
Installation
Section titled “Installation”yarn add @rnx-kit/types-node --devor if you’re using npm
npm add --save-dev @rnx-kit/types-nodeimport type { PackageManifest, PackageData } from "@rnx-kit/types-node";Package Manifest Types
Section titled “Package Manifest Types”PackageManifest
Section titled “PackageManifest”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.
PackageData<T>
Section titled “PackageData<T>”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. |
Supporting Types
Section titled “Supporting Types”PackageExports
Section titled “PackageExports”A record mapping export paths to string entry points or ExportsGroup objects.
ExportsGroup
Section titled “ExportsGroup”Conditional export map with types, import, require, and default fields.
PackagePerson
Section titled “PackagePerson”A package author or contributor, either as a string or a PersonEntry object
with name, email, and url fields.
FundingEntry
Section titled “FundingEntry”A funding source, either as a URL string or an object with type and url.