type-fest 2.11.2 → 2.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "type-fest",
3
- "version": "2.11.2",
3
+ "version": "2.12.0",
4
4
  "description": "A collection of essential TypeScript types",
5
5
  "license": "(MIT OR CC0-1.0)",
6
6
  "repository": "sindresorhus/type-fest",
@@ -232,6 +232,13 @@ declare namespace PackageJson {
232
232
  | {[key in ExportCondition]: Exports}
233
233
  | {[key: string]: Exports}; // eslint-disable-line @typescript-eslint/consistent-indexed-object-style
234
234
 
235
+ /**
236
+ Import map entries of a module, optionally with conditions.
237
+ */
238
+ export type Imports = { // eslint-disable-line @typescript-eslint/consistent-indexed-object-style
239
+ [key: string]: string | {[key in ExportCondition]: Exports};
240
+ };
241
+
235
242
  export interface NonStandardEntryPoints {
236
243
  /**
237
244
  An ECMAScript module ID that is the primary entry point to the program.
@@ -416,12 +423,19 @@ declare namespace PackageJson {
416
423
  main?: string;
417
424
 
418
425
  /**
419
- Standard entry points of the package, with enhanced support for ECMAScript Modules.
426
+ Subpath exports to define entry points of the package.
420
427
 
421
- [Read more.](https://nodejs.org/api/esm.html#esm_package_entry_points)
428
+ [Read more.](https://nodejs.org/api/packages.html#subpath-exports)
422
429
  */
423
430
  exports?: Exports;
424
431
 
432
+ /**
433
+ Subpath imports to define internal package import maps that only apply to import specifiers from within the package itself.
434
+
435
+ [Read more.](https://nodejs.org/api/packages.html#subpath-imports)
436
+ */
437
+ imports?: Imports;
438
+
425
439
  /**
426
440
  The executable files that should be installed into the `PATH`.
427
441
  */