Skip to content

Conversation

ktsn
Copy link
Member

@ktsn ktsn commented Sep 14, 2020

This PR adds a new docs section that describes how to annotate this type on functions in the decorator.

@Component<Post>({ // <---
  watch: {
    postId(id: string) {
      this.fetchPost(id)
    }
  }
})
class Post extends Vue {
  postId: string

  fetchPost(postId: string): Promise<void> {
    // ...
  }
}

@ktsn ktsn merged commit 7f17ca6 into master Sep 14, 2020
@ktsn ktsn deleted the decorator-type-parameter-docs branch September 14, 2020 15:50
nevilm-lt pushed a commit to nevilm-lt/vue-class-component that referenced this pull request Mar 1, 2022
nevilm-lt pushed a commit to nevilm-lt/vue-class-component that referenced this pull request Apr 22, 2022
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

Successfully merging this pull request may close these issues.

1 participant