New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript: Expose a `Next` type #2497

Open
wants to merge 1 commit into
base: dev
from

Conversation

Projects
None yet
2 participants
@beary

beary commented Nov 25, 2018

Expose a Next type for this usage:

// ...
import { Route, Next } from 'vue-router'

@Component
export default class Verify extends Vue {
  // ...
  private beforeRouteEnter(to: Route, from: Route, next: Next) {
    next(vm => {
      vm.$data.username = decodeURIComponent(to.query.username || '')
    })
  }
}

@posva posva added the Typescript label Nov 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment