{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/vue-router/issues/2248","repository_url":"https://api.github.com/repos/vuejs/vue-router","labels_url":"https://api.github.com/repos/vuejs/vue-router/issues/2248/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue-router/issues/2248/comments","events_url":"https://api.github.com/repos/vuejs/vue-router/issues/2248/events","html_url":"https://github.com/vuejs/vue-router/issues/2248","id":330934538,"node_id":"MDU6SXNzdWUzMzA5MzQ1Mzg=","number":2248,"title":"is not assignable to type 'RouterOptions' because of computed property on component","user":{"login":"carltierney","id":765646,"node_id":"MDQ6VXNlcjc2NTY0Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/765646?v=4","gravatar_id":"","url":"https://api.github.com/users/carltierney","html_url":"https://github.com/carltierney","followers_url":"https://api.github.com/users/carltierney/followers","following_url":"https://api.github.com/users/carltierney/following{/other_user}","gists_url":"https://api.github.com/users/carltierney/gists{/gist_id}","starred_url":"https://api.github.com/users/carltierney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carltierney/subscriptions","organizations_url":"https://api.github.com/users/carltierney/orgs","repos_url":"https://api.github.com/users/carltierney/repos","events_url":"https://api.github.com/users/carltierney/events{/privacy}","received_events_url":"https://api.github.com/users/carltierney/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-10T02:28:20Z","updated_at":"2018-06-10T02:28:21Z","closed_at":"2018-06-10T02:28:21Z","author_association":"NONE","body":"So I have two components, one works with computed properties the other one does not.   If I remove computed from the component vue-router will compile without an error.   \r\n\r\n\r\nOtherwise it throws the following error: \r\nTS2345: Argument of type '{ routes: ({ name: string; path: string; components: { default: { name: string; props: string[]; ...' is not assignable to parameter of type 'RouterOptions | undefined'.\r\n  Type '{ routes: ({ name: string; path: string; components: { default: { name: string; props: string[]; ...' is not assignable to type 'RouterOptions'.\r\n    Types of property 'routes' are incompatible.\r\n      Type '({ name: string; path: string; components: { default: { name: string; props: string[]; methods: {...' is not assignable to type 'RouteConfig[] | undefined'.\r\n        Type '({ name: string; path: string; components: { default: { name: string; props: string[]; methods: {...' is not assignable to type 'RouteConfig[]'.\r\n          Type '{ name: string; path: string; components: { default: { name: string; props: string[]; methods: { ...' is not assignable to type 'RouteConfig'.\r\n            Type '{ name: string; path: string; components: { default: { name: string; props: string[]; methods: { ...' is not assignable to type 'RouteConfig'.\r\n              Types of property 'components' are incompatible.\r\n                Type '{ default: { name: string; props: string[]; methods: { [x: string]: ActionMethod | MutationMethod...' is not assignable to type 'Dictionary<Component> | undefined'.\r\n                  Type '{ default: { name: string; props: string[]; methods: { [x: string]: ActionMethod | MutationMethod...' is not assignable to type 'Dictionary<Component>'.\r\n                    Property 'default' is incompatible with index signature.\r\n                      Type '{ name: string; props: string[]; methods: { [x: string]: ActionMethod | MutationMethod | Computed...' is not assignable to type 'Component'.\r\n                        Type '{ name: string; props: string[]; methods: { [x: string]: ActionMethod | MutationMethod | Computed...' is not assignable to type 'AsyncComponent<DefaultData<never>, DefaultMethods<never>, DefaultComputed, Record<string, any>>'.\r\n                          Type '{ name: string; props: string[]; methods: { [x: string]: ActionMethod | MutationMethod | Computed...' provides no match for the signature '(resolve: (component: Component<DefaultData<never>, DefaultMethods<never>, DefaultComputed, Record<string, any>>) => void, reject: (reason?: any) => void): void | Promise<VueConstructor<Vue> | FunctionalComponentOptions<Record<string, any>, PropsDefinition<Record<string, any>>> | ComponentOptions<never, DefaultData<never>, DefaultMethods<never>, DefaultComputed, Record<string, any>, Record<string, any>> | EsModuleComponent>'.\r\n\r\n**Router Code:\r\n\r\n```\r\nimport designationSearchComponent from './modules/designation/designationSearch.vue';\r\nimport designationDetailComponent from './modules/designation/designationdetailcomponent.vue';\r\nimport givebuttonComponent from './modules/giving/givebutton.vue';\r\n\r\n\r\nexport const routes = [\r\n\r\n    { name: 'fundabledetail', path: '/designationdetail/:id', components: { default: designationDetailComponent, givebutton: givebuttonComponent }, props: { default: true, givebutton: false } },\r\n    { name: 'searchandbrowse', path: '/searchandbrowse', components: { default: designationSearchComponent, givebutton: givebuttonComponent } },\r\n    \r\n]\r\n```\r\n\r\n\r\n\r\n**Component Code: DesignationDetailComponent.vue**\r\n```\r\n\r\n\r\n<template>\r\n    <div id=\"myApplication\">\r\n        <div v-if=\"loading===false\">\r\n            <h1>Designation Detail Preview for {{id}}</h1>\r\n\r\n            <p></p>\r\n        </div>\r\n        \r\n        \r\n    </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\n\r\n   \r\n    import { mapActions, mapGetters, mapMutations, mapState } from 'Vuex';\r\n    import { FundableDetail } from '../api/api';\r\n    import { IPage } from '../api/parents.ts';\r\n    import givebutton from '../giving/givebutton.vue';\r\n    import store from '../store/store';\r\n\r\n    export default {\r\n\r\n        name: 'designation-detail',\r\n        props: ['id'],\r\n        methods: {\r\n            ...mapActions({\r\n                getServerDetail: 'designationDetail/getDesignation'\r\n            }),\r\n            ...mapMutations({ setId: 'designationDetail/setId' }),\r\n            ...mapState({\r\n                designation: state => store.state.designationDetail.designation,\r\n                designationId: state => store.state.designationDetail.id\r\n            }),\r\n            ...mapGetters({\r\n                getData: 'designationDetail/designation'\r\n            })\r\n        },\r\n        computed: {\r\n\r\n        },\r\n        data: function() {\r\n            return {\r\n                photoUrl: '__PHOTOURL__',\r\n                loading: false\r\n               \r\n            };\r\n        },\r\n        created() {\r\n            //this['setId'](this['id']);\r\n            //this['loading'] = true\r\n            //this['getServerDetail']().then(() => {\r\n            //    console.log('this', this);\r\n            //    this['loading'] = false;\r\n            //})\r\n        }\r\n       \r\n       \r\n};\r\n\r\n</script>\r\n\r\n<style>\r\n    #app {\r\n      text-align: center;\r\n      color: #2c3e50;\r\n      margin-top: 60px;\r\n    }\r\n</style>\r\n```\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/vuejs/vue-router/issues/comments/396014633","html_url":"https://github.com/vuejs/vue-router/issues/2248#issuecomment-396014633","issue_url":"https://api.github.com/repos/vuejs/vue-router/issues/2248","id":396014633,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NjAxNDYzMw==","user":{"login":"vue-issue-bot","id":26507650,"node_id":"MDQ6VXNlcjI2NTA3NjUw","avatar_url":"https://avatars0.githubusercontent.com/u/26507650?v=4","gravatar_id":"","url":"https://api.github.com/users/vue-issue-bot","html_url":"https://github.com/vue-issue-bot","followers_url":"https://api.github.com/users/vue-issue-bot/followers","following_url":"https://api.github.com/users/vue-issue-bot/following{/other_user}","gists_url":"https://api.github.com/users/vue-issue-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/vue-issue-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vue-issue-bot/subscriptions","organizations_url":"https://api.github.com/users/vue-issue-bot/orgs","repos_url":"https://api.github.com/users/vue-issue-bot/repos","events_url":"https://api.github.com/users/vue-issue-bot/events{/privacy}","received_events_url":"https://api.github.com/users/vue-issue-bot/received_events","type":"User","site_admin":false},"created_at":"2018-06-10T02:28:21Z","updated_at":"2018-06-10T02:28:21Z","author_association":"NONE","body":"Hello, your issue has been closed because it does not conform to our issue requirements. In order to ensure every issue provides the necessary information for us to investigate, we require the use of the [Issue Helper](https://new-issue.vuejs.org/?repo=vuejs/vue-router) when creating new issues. Thank you!\n"}}
{"actor":{"display_login":"vue-issue-bot"}}