@maddimathon/utility-typescript
Version:
TypeScript utilities (types, functions, classes) to use in various projects.
119 lines • 2.95 kB
TypeScript
/**
* @since 2.0.0-alpha
*
* @packageDocumentation
*/
/*!
* @maddimathon/utility-typescript@2.0.0-beta.1
* @license MIT
*/
/**
* Only for {@link PackageJson}.
*/
export interface PackageJson_Overrides {
[]: string | PackageJson_Overrides;
}
/**
* The general shape of most package.json (npm) files.
*
* Taken from {@link https://docs.npmjs.com/cli/v11/configuring-npm/package-json | NPM docs}.
* Last updated 2025-05-14.
*
* @since 2.0.0-alpha
*
* @UPGRADE Add in proper doc blocks for more of the properties.
*/
export interface PackageJson {
/**
* Name of the package.
*
* > Some rules:
*
* > The name must be less than or equal to 214 characters. This includes the scope for scoped packages.
*
* > The names of scoped packages can begin with a dot or an underscore. This is not permitted without a scope.
*
* > New packages must not have uppercase letters in the name.
*
* > The name ends up being part of a URL, an argument on the command line, and a folder name. Therefore, the name can't contain any non-URL-safe characters
*/
name: string;
/**
* Current package version.
*
* > Version must be parseable by {@link https://github.com/npm/node-semver | node-semver}, which is bundled with npm as a dependency.
*/
version: string;
description?: string;
keywords?: string[];
homepage?: string;
bugs?: {
url?: string;
email?: string;
};
license?: string;
author?: string | {
name: string;
email?: string;
url?: string;
};
contributors?: Required<PackageJson>['author'][];
funding?: string | {
type: string;
url: string;
} | (string | {
type: string;
url: string;
})[];
files?: string[];
main?: string;
browser?: string;
bin?: string | {
[]: string;
};
man?: string | string[];
directories?: {
[]: string;
};
repository?: string | {
type: string;
url: string;
directory?: string;
};
scripts?: {
[]: string;
};
config?: {
[]: any;
};
dependencies?: {
[]: string;
};
devDependencies?: {
[]: string;
};
peerDependencies?: {
[]: string;
};
peerDependenciesMeta?: {
[]: {
[]: string;
};
};
bundleDependencies?: string[];
optionalDependencies?: {
[]: string;
};
overrides?: PackageJson_Overrides;
engines?: {
[]: string;
};
os?: string[];
cpu?: string[];
private?: boolean;
publishConfig?: {
[]: boolean | number | string;
};
workspaces?: string[];
}
//# sourceMappingURL=PackageJson.d.ts.map