Skip to content

Commit

Permalink
chore: remove next type annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
Midnighter committed May 16, 2019
1 parent a25bbc7 commit 5c976e0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 0 additions & 4 deletions src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ import PrivacyPolicy from "./views/PrivacyPolicy.vue";
import TermsOfService from "./views/TermsOfService.vue";
import NotFound from "./views/NotFound.vue";

// FIXME (Moritz Beber): In future we would like to import this from vue-router.
// This is tracked in https://github.com/DD-DeCaF/caffeine-vue/issues/40
export type NextHandler = (to?: RawLocation | false | Function | void) => void;

Vue.use(Router);

const authGuard: NavigationGuard = (to, from, next) => {
Expand Down
3 changes: 1 addition & 2 deletions src/views/Design.vue
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ import { ModelItem, organism2ModelMapping } from "@/store/modules/models";
import NewProject from "@/components/NewProject.vue";
import NewOrganism from "@/components/NewOrganism.vue";
import NewModel from "@/components/NewModel.vue";
import { NextHandler } from "@/router";
import { RuleHandler, RuleOutcome } from "@/types/forms";
interface ProductItem {
Expand Down Expand Up @@ -353,7 +352,7 @@ export default Vue.extend({
created() {
this.fetchProducts();
},
beforeRouteLeave(to: Route, from: Route, next: NextHandler) {
beforeRouteLeave(to: Route, from: Route, next) {
if (!this.isSubmitted && this.hasEdits) {
const answer = window.confirm(
"Do you really want to leave? You have pending changes."
Expand Down

0 comments on commit 5c976e0

Please sign in to comment.