Skip to content

Commit 208b0b9

Browse files
authored
Fork types for TS 5.1 and beyond (#4548)
1 parent 514183f commit 208b0b9

File tree

6 files changed

+453
-26
lines changed

6 files changed

+453
-26
lines changed

package-lock.json

Lines changed: 18 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,16 @@
99
"umd:main": "dist/preact.umd.js",
1010
"unpkg": "dist/preact.min.js",
1111
"source": "src/index.js",
12+
"typesVersions": {
13+
"<=5.0": {
14+
".": ["./src/index-5.d.ts"]
15+
}
16+
},
1217
"exports": {
1318
".": {
19+
"types@<=5.0": {
20+
"types": "./src/index-5.d.ts"
21+
},
1422
"types": "./src/index.d.ts",
1523
"browser": "./dist/preact.module.js",
1624
"umd": "./dist/preact.umd.js",
@@ -105,7 +113,7 @@
105113
},
106114
"types": "src/index.d.ts",
107115
"scripts": {
108-
"prepare": "husky && run-s build && check-export-map && npm-merge-driver-install",
116+
"prepare": "husky && run-s build && npm-merge-driver-install",
109117
"build": "npm-run-all --parallel build:*",
110118
"build:core": "microbundle build --raw --no-generateTypes -f cjs,esm,umd",
111119
"build:core-min": "microbundle build --raw --no-generateTypes -f cjs,esm,umd,iife src/cjs.js -o dist/preact.min.js",
@@ -246,7 +254,7 @@
246254
"sade": "^1.8.1",
247255
"sinon": "^9.2.3",
248256
"sinon-chai": "^3.7.0",
249-
"typescript": "^4.9.5",
257+
"typescript": "5.1.6",
250258
"undici": "^4.12.0"
251259
},
252260
"volta": {

0 commit comments

Comments
 (0)