$ gnpm install types-pkg-json
Type checking for package.json.
Derived from type-fest with a focus on package.json types.
yarn add types-pkg-json
npm install types-pkg-json
import { PackageJSON, fileName, PackageJSONFileName } from "types-pkg-json"; // Type for NPM's package.json file
console.log(fileName); // "package.json"
import {
BugsLocation, // Used by the `bugs` field.
LicenseID, // Used by the `license` and `licenses.type` fields.
Person, // Used by the `author`, `contributors`, and `maintainers` fields.
DirectoryLocations, // Used by the `directories` field.
Repository, // Used by the `repository` field.
Scripts, // Used by the `scripts` field.
Dependencies // Used by the `dependencies`, `devDependencies`, `optionalDependencies`, and `peerDependencies` fields.
} from "types-pkg-json";
import {
NonStandardEntryPoints, // module, esnext, browser, sideEffects
TypeScriptConfiguration, // types, typings
WorkspaceConfig, // packages, nohoist
YarnConfiguration, // workspaces, flat, resolutions
JSPMConfiguration, // jspm
ESLintConfiguration // eslintConfig
} from "types-pkg-json";
import {
isJSONObject
JSONObject,
JSONValue,
JSONArray,
Primitive,
LiteralUnion
} from "types-pkg-json";
function isJSONObject(object?: JSONValue): object is JSONObject;
Copyright 2013 - present © cnpmjs.org | Home |