@types/react-dates: Add null as valid value for FocusedInputShape

React dates accepts but more importantly returns `null` as a valid focused state.
Not having this in the typings allows unexpected errors when using `strictNulls` checking.
```typescript
if (focusedInput !== undefined) {
  // focusedInput input could be null here, but the type system does not acknowledge that. 
}
```
This commit is contained in:
Tyler Jones
2017-03-23 10:58:10 -07:00
committed by GitHub
parent 8a308e57a7
commit 41c9ec7fb5
+1 -1
View File
@@ -18,7 +18,7 @@ declare namespace momentPropTypes{
declare namespace ReactDates{
type AnchorDirectionShape = 'left' | 'right';
type FocusedInputShape = 'startDate' | 'endDate';
type FocusedInputShape = 'startDate' | 'endDate' | null;
type OrientationShape = 'horizontal' | 'vertical';
type ScrollableOrientationShape = 'horizontal' | 'vertical' | 'verticalScrollable';