File tree 1 file changed +18
-8
lines changed
1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,22 @@ export type PackageJsonPerson =
9
9
url ?: string ;
10
10
} ;
11
11
12
+ export type PackageJsonExports =
13
+ | string
14
+ | string [ ]
15
+ | {
16
+ [ P in
17
+ | "."
18
+ | "import"
19
+ | "require"
20
+ | "types"
21
+ | "node"
22
+ | "browser"
23
+ | "default"
24
+ // eslint-disable-next-line @typescript-eslint/ban-types
25
+ | ( string & { } ) ] : PackageJsonExports ;
26
+ } ;
27
+
12
28
export interface PackageJson {
13
29
/**
14
30
* The name is what your thing is called.
@@ -148,15 +164,9 @@ export interface PackageJson {
148
164
* Docs:
149
165
* - https://nodejs.org/docs/latest-v14.x/api/esm.html#esm_exports_sugar
150
166
*
151
- * @default 'commonjs'
152
- * @since Node.js v14
167
+ * @since Node.js v12.7
153
168
*/
154
- exports ?:
155
- | string
156
- | Record <
157
- "import" | "require" | "." | "node" | "browser" | string ,
158
- string | Record < "import" | "require" | string , string >
159
- > ;
169
+ exports ?: PackageJsonExports ;
160
170
/**
161
171
* Docs:
162
172
* - https://nodejs.org/api/packages.html#imports
You can’t perform that action at this time.
0 commit comments