payload: {"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/composition-api/issues/215","repository_url":"https://api.github.com/repos/vuejs/composition-api","labels_url":"https://api.github.com/repos/vuejs/composition-api/issues/215/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/composition-api/issues/215/comments","events_url":"https://api.github.com/repos/vuejs/composition-api/issues/215/events","html_url":"https://github.com/vuejs/composition-api/issues/215","id":542470489,"node_id":"MDU6SXNzdWU1NDI0NzA0ODk=","number":215,"title":"PropType doesn't work well with Array type","user":{"login":"lephuongbg","id":1001176,"node_id":"MDQ6VXNlcjEwMDExNzY=","avatar_url":"https://avatars1.githubusercontent.com/u/1001176?v=4","gravatar_id":"","url":"https://api.github.com/users/lephuongbg","html_url":"https://github.com/lephuongbg","followers_url":"https://api.github.com/users/lephuongbg/followers","following_url":"https://api.github.com/users/lephuongbg/following{/other_user}","gists_url":"https://api.github.com/users/lephuongbg/gists{/gist_id}","starred_url":"https://api.github.com/users/lephuongbg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lephuongbg/subscriptions","organizations_url":"https://api.github.com/users/lephuongbg/orgs","repos_url":"https://api.github.com/users/lephuongbg/repos","events_url":"https://api.github.com/users/lephuongbg/events{/privacy}","received_events_url":"https://api.github.com/users/lephuongbg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-12-26T07:50:30Z","updated_at":"2019-12-26T10:43:24Z","closed_at":null,"author_association":"NONE","body":"Following snippet will demonstrate the issue when declaring Array-based PropType:\r\n\r\n```typescript\r\n\r\nimport {createComponent} from '@vue/composition-api'\r\nimport {PropType} from 'vue'\r\n\r\ntype Indexes = Array<number>\r\ninterface User {name: string}\r\n\r\nexport default createComponent({\r\n    props: {\r\n        indexes: {\r\n            type: Array as PropType<Indexes>\r\n        },\r\n        index: {\r\n            type: Number\r\n        },\r\n        user: {\r\n            type: Object as PropType<User>\r\n        }\r\n    },\r\n    setup (props) {\r\n        setupIndexes(props.indexes) // <-- TS2345 error\r\n        setupIndex(props.index) // <-- OK\r\n        setupUser(props.user) // <--- OK\r\n    }\r\n})\r\n\r\nfunction setupIndexes (indexes: Indexes) {}\r\nfunction setupIndex (index: number) {}\r\nfunction setupUser (user: User) {}\r\n```\r\n\r\nThe specific error is following:\r\n\r\n```\r\nTS2345: Argument of type '{ type: PropType<Indexes>; }' is not assignable to parameter of type 'Indexes'. \r\nType '{ type: PropType<Indexes>; }' is missing the following properties from type 'Indexes': length, pop, push, concat, and 26 more.\r\n```\r\n\r\nI'm not familiar with TS so I don't know whether it suppose to have that error or not. If it is not a bug then what should be the correct way to declare array type for props?"},"comment":{"url":"https://api.github.com/repos/vuejs/composition-api/issues/comments/569035623","html_url":"https://github.com/vuejs/composition-api/issues/215#issuecomment-569035623","issue_url":"https://api.github.com/repos/vuejs/composition-api/issues/215","id":569035623,"node_id":"MDEyOklzc3VlQ29tbWVudDU2OTAzNTYyMw==","user":{"login":"LinusBorg","id":1444526,"node_id":"MDQ6VXNlcjE0NDQ1MjY=","avatar_url":"https://avatars3.githubusercontent.com/u/1444526?v=4","gravatar_id":"","url":"https://api.github.com/users/LinusBorg","html_url":"https://github.com/LinusBorg","followers_url":"https://api.github.com/users/LinusBorg/followers","following_url":"https://api.github.com/users/LinusBorg/following{/other_user}","gists_url":"https://api.github.com/users/LinusBorg/gists{/gist_id}","starred_url":"https://api.github.com/users/LinusBorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LinusBorg/subscriptions","organizations_url":"https://api.github.com/users/LinusBorg/orgs","repos_url":"https://api.github.com/users/LinusBorg/repos","events_url":"https://api.github.com/users/LinusBorg/events{/privacy}","received_events_url":"https://api.github.com/users/LinusBorg/received_events","type":"User","site_admin":false},"created_at":"2019-12-26T10:43:24Z","updated_at":"2019-12-26T10:43:24Z","author_association":"MEMBER","body":"```javascript\r\nprops: {\r\n        indexes: {\r\n            type: Array\r\n        } as PropOptions<Indexes>,\r\n```"}}
other: {"actor":{"display_login":"LinusBorg"}}