Commit a07c823
Make all getTransformOptions result properties optional
Summary:
Types `getTransformOptions` as returning an object with all-optional properties.
There's no need to force Metro config authors to return a bunch of empty properties when they just want to set `transform.inlineRequires` to `true`. (Also, as a practical matter, these are already treated as optional almost everywhere, including in the React Native template.)
In an upcoming diff I will document `getTransformOptions` on the Metro website and explain what all these options are for.
Changelog:
* **[Fix]:** Make all `getTransformOptions` result properties optional
Reviewed By: huntie
Differential Revision: D41400791
fbshipit-source-id: c30dfa57ec257f079fdb4e78863fdf0dc8f968d41 parent a6b8620 commit a07c823
File tree
2 files changed
+9
-9
lines changed- packages
- metro-config/src
- metro/src/lib
2 files changed
+9
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
105 | | - | |
| 104 | + | |
| 105 | + | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
0 commit comments