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

Modify the scaffold snippet for TypeScript #669

Closed
ghost opened this issue Jan 24, 2018 · 5 comments
Closed

Modify the scaffold snippet for TypeScript #669

ghost opened this issue Jan 24, 2018 · 5 comments

Comments

@ghost
Copy link

ghost commented Jan 24, 2018

I think it's more useful to change it to the way components should be defined in Vue 2.5.0+ (link):

import Vue from 'vue'

export default Vue.extend({

})
@HerringtonDarkholme
Copy link
Member

I think so.
Though pretty many TS users actually use vue-class-component rather than vanilla Vue.

Maybe we can change scaffold in future if Vue officially support native class syntax.

@ghost
Copy link
Author

ghost commented Jan 25, 2018

Fair enough. Could also have two snippets:

  • script with TypeScript
  • script with TypeScript (class component)

@HerringtonDarkholme
Copy link
Member

#671

@WORMSS
Copy link

WORMSS commented Jul 20, 2019

is there anyway for us to have our own ?

we use

<template>

</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';

@Component({
  components: {},
})
export default class <filename> extends Vue {
}
</script>

and I have no idea how I set it to do that rather than Vue.extends

@octref
Copy link
Member

octref commented Aug 6, 2019

Wait for #1151, which I have already started to work on in https://github.com/vuejs/vetur/tree/scaffold-snippet.

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

3 participants