I have this vue component inside a subcomponent:
show.blade.php
new Vue({
el: '.v-thread',
name: 'Thread',
data: {
posts: @json($posts),
selectablePosts: @json($selectablePosts),
postActions: {
'delete': "{{ Forum::route('bulk.post.delete') }}",
'restore': "{{ Forum::route('bulk.post.restore') }}"
},
postActionMethods: {
'delete': 'DELETE',
'restore': 'POST'
},
selectedPostAction: 'delete',
selectedPosts: [],
selectedThreadAction: null
},
created() {
this.posts.data = this.posts.data.filter(post => post.sequence != 1);
},
methods: {
toggleAll() {
this.selectedPosts = (this.selectedPosts.length < this.selectablePosts.length) ? this.selectablePosts : [];
},
submitThread(event) {
if (this.threadActionMethods[this.selectedThreadAction] === 'DELETE' && !confirm("{{ trans('forum::general.generic_confirm') }}")) {
event.preventDefault();
}
},
submitPosts(event) {
if (this.postActionMethods[this.selectedPostAction] === 'DELETE' && !confirm("{{ trans('forum::general.generic_confirm') }}")) {
event.preventDefault();
}
}
}
});
Because of the written style, I receive an error from VS Code:
Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.javascript
I created a tsconfig.json like this:
{
"compilerOptions": {
"experimentalDecorators": true,
"allowJs": true
}
}
and I also enabled the enabled the settings for 'Experimental JS Decorators' in VS:
"js/ts.implicitProjectConfig.experimentalDecorators": true,
Still I have this issue. Did I miss something?