diff --git a/source/package-json.d.ts b/source/package-json.d.ts index 1bccfd041..99fb9e597 100644 --- a/source/package-json.d.ts +++ b/source/package-json.d.ts @@ -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 + | ExportConditions + | {[path: string]: Exports}; // eslint-disable-line @typescript-eslint/consistent-indexed-object-style /** Import map entries of a module, optionally with conditions.