Commit c39e0f3
committed
Remove unnecessary invariant in favor of explicit cast
See open TS issue microsoft/TypeScript#31613
Marked with FIXME for when TS feature/bug fix lands upstream
[This code will likely be removed in v17 prior to the feature landing, but may be retained within v16 for longer.]
Similar code "works" at https://github.com/graphql/graphql-js/blob/1f8ba95c662118452bd969c6b26ba4e9050c55da/src/error/GraphQLError.ts#L47 because all the option properties are optional.1 parent 120ae79 commit c39e0f3
1 file changed
+2
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
| |||
108 | 107 | | |
109 | 108 | | |
110 | 109 | | |
111 | | - | |
112 | | - | |
113 | 110 | | |
114 | 111 | | |
115 | | - | |
| 112 | + | |
| 113 | + | |
116 | 114 | | |
117 | 115 | | |
118 | 116 | | |
| |||
0 commit comments