-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit d8a2391
feat: Move
Type dependencies need to match their runtime counterpart.
If `foo` is a dependency, `@types/foo` needs to be one as well.
If `foo` is a peer dependency, `@types/foo` needs to be one as well.
This is especially apparent if the constraint on `foo` spans multiple major versions.
If we'd make `@types/foo` a direct dependency, users couldn't control which major version they get.
Package managers would pick the highest.
By moving `@types/foo` to peer dependencies, users can control which version of `foo` and `@types/foo` they have.@types/react-dom
to peer dependencies1 parent d143f46 commit d8a2391
1 file changed
+8
-2
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
46 | 46 |
| |
47 | 47 |
| |
48 | 48 |
| |
49 | - | ||
50 | - | ||
49 | + | ||
51 | 50 |
| |
52 | 51 |
| |
52 | + | ||
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
| |||
62 | 62 |
| |
63 | 63 |
| |
64 | 64 |
| |
65 | + | ||
65 | 66 |
| |
66 | 67 |
| |
67 | 68 |
| |
69 | + | ||
70 | + | ||
71 | + | ||
72 | + | ||
73 | + | ||
68 | 74 |
| |
69 | 75 |
| |
70 | 76 |
| |
|
0 commit comments