Commit 43fc3bd
authored
fix(types): add explicit
When typescript is used with the option `exactOptionalProperty: true`, this code fails to typecheck if `undefined` is passed in for the response value.
This is because `exactOptionalProperty` makes tsc consider `?:..` different from `: ... | undefined` for more strictness.| undefined to optional fields (#462)1 parent cd5dc6e commit 43fc3bd
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
0 commit comments