Skip to content

Commit a5bfc23

Browse files
committed
Support TypeScript integrations
Explicitly add 'types' to each conditional package export. Close facebook#268
1 parent c8f9de8 commit a5bfc23

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

apps/website/docs/api/04-other/03-document.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Only the read-only APIs should be used in the context of React Strict DOM, as Re
2020
| ---- | ---- | ---- | ---- |
2121
| document.activeElement ||| |
2222
| document.defaultView ||| |
23-
| document.getElementFromPoint(x,y) ||| |
23+
| [document.elementFromPoint(x,y)](https://developer.mozilla.org/en-US/docs/Web/API/Document/elementFromPoint) ||| |
2424
| document.hidden ||| |
2525
| document.visibilityState ||| |
2626
| "scroll" event ||| |

packages/react-strict-dom/package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@
44
"description": "React Strict DOM",
55
"exports": {
66
".": {
7-
"react-native": "./dist/native/index.js",
8-
"default": "./dist/dom/index.js"
7+
"react-native": {
8+
"types": "./dist/native/index.d.ts",
9+
"default": "./dist/native/index.js"
10+
},
11+
"default": {
12+
"types": "./dist/dom/index.d.ts",
13+
"default": "./dist/dom/index.js"
14+
}
915
},
1016
"./babel-preset": "./babel/preset.js",
1117
"./runtime": "./dist/dom/runtime.js",

0 commit comments

Comments
 (0)