test(ts): class decorator

This commit is contained in:
Guillaume Chau
2018-09-07 22:57:25 +02:00
parent 97d317e765
commit f27a54ee61
4 changed files with 29 additions and 1 deletions
+1
View File
@@ -71,6 +71,7 @@
"typescript": "^2.9.2",
"uglify-es": "^3.1.6",
"vue": "^2.5.16",
"vue-property-decorator": "^7.0.0",
"vuepress": "^0.14.2"
}
}
+10
View File
@@ -0,0 +1,10 @@
import { Component, Vue } from 'vue-property-decorator'
@Component({
apollo: {
allFilms: '',
},
})
export default class Decorator extends Vue {
allFilms = []
}
+8 -1
View File
@@ -6,6 +6,7 @@ import { HttpLink } from 'apollo-link-http'
import VueApollo from '../index'
import App from './App'
import Decorator from './Decorator'
const httpLink = new HttpLink({ uri: 'https://dummy.test.com' })
const cache: any = 'dummy cache';
@@ -26,4 +27,10 @@ const apolloProvider = new VueApollo({
Vue.use(VueApollo)
/* eslint no-new: 0 */
new Vue({ el: '#app', provide: apolloProvider.provide(), render: h => h(App) })
new Vue({
el: '#app',
provide: apolloProvider.provide(),
render: h => h(App, [
h(Decorator)
])
})
+10
View File
@@ -7209,6 +7209,10 @@ vm-browserify@0.0.4:
dependencies:
indexof "0.0.1"
vue-class-component@^6.2.0:
version "6.2.0"
resolved "https://registry.yarnpkg.com/vue-class-component/-/vue-class-component-6.2.0.tgz#7adb1daa9a868c75f30f97f33f4f1b94aee62089"
vue-hot-reload-api@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/vue-hot-reload-api/-/vue-hot-reload-api-2.3.0.tgz#97976142405d13d8efae154749e88c4e358cf926"
@@ -7223,6 +7227,12 @@ vue-loader@^15.2.4:
vue-hot-reload-api "^2.3.0"
vue-style-loader "^4.1.0"
vue-property-decorator@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/vue-property-decorator/-/vue-property-decorator-7.0.0.tgz#46f53dd741eb86c3af091bb0492400c450eebf19"
dependencies:
vue-class-component "^6.2.0"
vue-router@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.0.1.tgz#d9b05ad9c7420ba0f626d6500d693e60092cc1e9"