Skip to content
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

Property '$route' does not exist on type 'default' #21

Open
Darkbish opened this issue Jun 1, 2018 · 0 comments
Open

Property '$route' does not exist on type 'default' #21

Darkbish opened this issue Jun 1, 2018 · 0 comments

Comments

@Darkbish
Copy link

Darkbish commented Jun 1, 2018

Generate .d.ts file failed if the .vue file used this.$route.

Here is a SFC file in my project.

<template>
  <div>Hello {{foo}}</div>
</template>

<script lang="ts">
import Vue from 'vue'
import Component from 'vue-class-component'

@Component({
  name: 'Home',
})
export default class extends Vue {
  public foo = 'foo'

  public created() {
    console.log(this.$route.path)
  }
}
</script>

and this is output:

C:\Program Files\nodejs\node.exe --inspect-brk=10721 build\test.js 
Debugger listening on ws://127.0.0.1:10721/f5ad21c6-c6ae-4f2c-bae0-e3e4786dc9dc
Emit Failed: c:\Users\Darkiller\Documents\ace\ace-community\src\views\Home.vue.d.ts
logger.js:16
  Error: [16,22] Property '$route' does not exist on type 'default'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant