Skip to content

Commit

Permalink
PackageJson: Support condition object in exports array (#439)
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber committed Aug 22, 2022
1 parent 1a69e63 commit 290e3a2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions source/package-json.d.ts
Expand Up @@ -223,15 +223,17 @@ declare namespace PackageJson {
string
>;

type ExportConditions = {[condition in ExportCondition]: Exports};

/**
Entry points of a module, optionally with conditions and subpath exports.
*/
export type Exports =
| null
| string
| string[]
| {[key in ExportCondition]: Exports}
| {[key: string]: Exports}; // eslint-disable-line @typescript-eslint/consistent-indexed-object-style
| Array<string | ExportConditions>
| ExportConditions
| {[path: string]: Exports}; // eslint-disable-line @typescript-eslint/consistent-indexed-object-style

/**
Import map entries of a module, optionally with conditions.
Expand Down

0 comments on commit 290e3a2

Please sign in to comment.