Skip to main content
Version: 7.0.0

loadedPackageSchema

const loadedPackageSchema: ZodObject<
object,
"strip",
ZodTypeAny,
object,
object
>;

Stricter schema for npm package.json metadata, with most fields guaranteed present

Type declaration

author

author: ZodString;

bugs

bugs: ZodOptional<ZodRecord<ZodString, ZodString>>;

dependencies

dependencies: ZodRecord<ZodString, ZodString>;

description

description: ZodString;

devDependencies

devDependencies: ZodOptional<ZodRecord<ZodString, ZodString>>;

homepage

homepage: ZodOptional<ZodString>;

keywords

keywords: ZodArray<ZodString, "many">;

license

license: ZodString;

lint-staged

lint-staged: ZodOptional<ZodRecord<ZodString, ZodString>>;

name

name: ZodString;

private

private: ZodBoolean;

repository

repository: ZodOptional<ZodRecord<ZodString, ZodString>>;

repositoryUrl

repositoryUrl: ZodOptional<ZodString>;

scripts

scripts: ZodRecord<ZodString, ZodString>;

type

type: ZodOptional<ZodString>;

version

version: ZodString;