Skip to content

Commit f6a3085

Browse files
authored
types(packagejson): add funding field (#224)
1 parent a96072a commit f6a3085

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/packagejson/types.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@ export interface PackageJson {
7979
*/
8080
contributors?: PackageJsonPerson[];
8181

82+
/**
83+
* An object containing a URL that provides up-to-date information
84+
* about ways to help fund development of your package,
85+
* a string URL, or an array of objects and string URLs
86+
*/
87+
funding: PackageJsonFunding | PackageJsonFunding[];
88+
8289
/**
8390
* The optional `files` field is an array of file patterns that describes the entries to be included when your package is installed as a dependency. File patterns follow a similar syntax to `.gitignore`, but reversed: including a file, directory, or glob pattern (`*`, `**\/*`, and such) will make it so that file is included in the tarball when it’s packed. Omitting the field will make it default to `["*"]`, which means it will include all files.
8491
*/
@@ -363,6 +370,8 @@ export type PackageJsonPerson =
363370
url?: string;
364371
};
365372

373+
export type PackageJsonFunding = string | { url: string; type?: string };
374+
366375
type PackageJsonExportKey =
367376
| "."
368377
| "import"

0 commit comments

Comments
 (0)