Update @types/history to the latest version 🚀 (#389)

* chore(package): update @types/history to version 4.6.2

* Rework type to newly added history overrides.
This commit is contained in:
greenkeeper[bot] 2017-11-28 18:47:29 -06:00 committed by Daniel Ternyak
parent 2451f817d4
commit 6da5fac1d1
2 changed files with 5 additions and 9 deletions

View File

@ -1,13 +1,7 @@
import React from 'react';
import { withRouter } from 'react-router-dom';
import Modal, { IButton } from 'components/ui/Modal';
import { Location, History as H } from 'history';
type UnregisterCallback = () => void;
type BooleanCallback = (arg?: any) => boolean;
interface History extends H {
block(prompt?: boolean | BooleanCallback): UnregisterCallback;
}
import { Location, History } from 'history';
interface Props {
when: boolean;
@ -50,7 +44,9 @@ class NavigationPrompt extends React.Component<Props, State> {
nextLocation
});
}
return !this.props.when;
if (this.props.when) {
return false;
}
});
}

View File

@ -44,7 +44,7 @@
},
"devDependencies": {
"@types/classnames": "2.2.3",
"@types/history": "4.6.1",
"@types/history": "4.6.2",
"@types/jest": "21.1.8",
"@types/lodash": "4.14.86",
"@types/qrcode": "0.8.0",