{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/33000","repository_url":"https://api.github.com/repos/Microsoft/vscode","labels_url":"https://api.github.com/repos/Microsoft/vscode/issues/33000/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vscode/issues/33000/comments","events_url":"https://api.github.com/repos/Microsoft/vscode/issues/33000/events","html_url":"https://github.com/Microsoft/vscode/issues/33000","id":252155560,"number":33000,"title":"Typescript Intelligence Bug: different behaviors on  interface implementation.","user":{"login":"zheeeng","id":1303154,"avatar_url":"https://avatars0.githubusercontent.com/u/1303154?v=4","gravatar_id":"","url":"https://api.github.com/users/zheeeng","html_url":"https://github.com/zheeeng","followers_url":"https://api.github.com/users/zheeeng/followers","following_url":"https://api.github.com/users/zheeeng/following{/other_user}","gists_url":"https://api.github.com/users/zheeeng/gists{/gist_id}","starred_url":"https://api.github.com/users/zheeeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zheeeng/subscriptions","organizations_url":"https://api.github.com/users/zheeeng/orgs","repos_url":"https://api.github.com/users/zheeeng/repos","events_url":"https://api.github.com/users/zheeeng/events{/privacy}","received_events_url":"https://api.github.com/users/zheeeng/received_events","type":"User","site_admin":false},"labels":[{"id":659722407,"url":"https://api.github.com/repos/Microsoft/vscode/labels/new%20release","name":"new release","color":"006b75","default":false},{"id":291055694,"url":"https://api.github.com/repos/Microsoft/vscode/labels/typescript","name":"typescript","color":"1d76db","default":false},{"id":286886536,"url":"https://api.github.com/repos/Microsoft/vscode/labels/upstream","name":"upstream","color":"708090","default":false}],"state":"closed","locked":false,"assignee":{"login":"mjbvz","id":12821956,"avatar_url":"https://avatars2.githubusercontent.com/u/12821956?v=4","gravatar_id":"","url":"https://api.github.com/users/mjbvz","html_url":"https://github.com/mjbvz","followers_url":"https://api.github.com/users/mjbvz/followers","following_url":"https://api.github.com/users/mjbvz/following{/other_user}","gists_url":"https://api.github.com/users/mjbvz/gists{/gist_id}","starred_url":"https://api.github.com/users/mjbvz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjbvz/subscriptions","organizations_url":"https://api.github.com/users/mjbvz/orgs","repos_url":"https://api.github.com/users/mjbvz/repos","events_url":"https://api.github.com/users/mjbvz/events{/privacy}","received_events_url":"https://api.github.com/users/mjbvz/received_events","type":"User","site_admin":false},"assignees":[{"login":"mjbvz","id":12821956,"avatar_url":"https://avatars2.githubusercontent.com/u/12821956?v=4","gravatar_id":"","url":"https://api.github.com/users/mjbvz","html_url":"https://github.com/mjbvz","followers_url":"https://api.github.com/users/mjbvz/followers","following_url":"https://api.github.com/users/mjbvz/following{/other_user}","gists_url":"https://api.github.com/users/mjbvz/gists{/gist_id}","starred_url":"https://api.github.com/users/mjbvz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjbvz/subscriptions","organizations_url":"https://api.github.com/users/mjbvz/orgs","repos_url":"https://api.github.com/users/mjbvz/repos","events_url":"https://api.github.com/users/mjbvz/events{/privacy}","received_events_url":"https://api.github.com/users/mjbvz/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2017-08-23T04:20:25Z","updated_at":"2017-08-24T10:01:59Z","closed_at":"2017-08-23T20:50:34Z","body":"- VSCode Version: Version 1.15.1 (1.15.1)\r\n- OS Version: OSX 10.11.6\r\n\r\nSteps to Reproduce:\r\n\r\n1. The minimal sample codes:\r\n```ts\r\ninterface Component<P, S> {\r\n  componentWillMount?(): void;\r\n  componentDidMount?(): void;\r\n  componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;\r\n  shouldComponentUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): boolean;\r\n  componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): void;\r\n  componentDidUpdate?(prevProps: Readonly<P>, prevState: Readonly<S>, prevContext: any): void;\r\n  componentWillUnmount?(): void;\r\n}\r\nclass Component<P, S> {\r\n}\r\n\r\nclass MyComponent extends Component<{}, {}> {\r\n  // Mark1\r\n  shouldComponentUpdate(nextProps, nextState, nextContext) {}\r\n  // Mark2\r\n}\r\n```\r\n2. Two problems:\r\n\r\n    a. [maybe bug] At Mark1 and Mark 2, typing ctrl + space gives me intelligence suggestion: all the life cycle methods. MyComponent just extends the Component not implements it. Compare with typescript playground, I can't even get any suggestions in `extends` or `implements` way. Does it is a bug that we get suggestions?\r\n\r\n    b. Assuming point a is normal behavior. \r\n        [bug] At Mark1, after popping suggested methods and select, auto-completion provides us the full method skeleton. e.g. type character 'c' (or ctrl + space), then select the `componentDidUpdate`, auto-completion produces 'componentDidUpdate(prevProps, prevState, prevContext)'.\r\n        [bug] At Mark2, type character 'c', I can't get any methods suggestion.\r\n        [bug] At Mark2, type ctrl + space, I get the unused methods suggestion. If I select one, auto-completion only produces the method's name. e.g. 'componentWillReceiveProps'. I have to fill the parameters, compare with Mark1 the different behavior make me confused.\r\n\r\n<!-- Launch with `code --disable-extensions` to check. -->\r\nReproduces without extensions: Yes"},"comment":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/comments/324591640","html_url":"https://github.com/Microsoft/vscode/issues/33000#issuecomment-324591640","issue_url":"https://api.github.com/repos/Microsoft/vscode/issues/33000","id":324591640,"user":{"login":"zheeeng","id":1303154,"avatar_url":"https://avatars0.githubusercontent.com/u/1303154?v=4","gravatar_id":"","url":"https://api.github.com/users/zheeeng","html_url":"https://github.com/zheeeng","followers_url":"https://api.github.com/users/zheeeng/followers","following_url":"https://api.github.com/users/zheeeng/following{/other_user}","gists_url":"https://api.github.com/users/zheeeng/gists{/gist_id}","starred_url":"https://api.github.com/users/zheeeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zheeeng/subscriptions","organizations_url":"https://api.github.com/users/zheeeng/orgs","repos_url":"https://api.github.com/users/zheeeng/repos","events_url":"https://api.github.com/users/zheeeng/events{/privacy}","received_events_url":"https://api.github.com/users/zheeeng/received_events","type":"User","site_admin":false},"created_at":"2017-08-24T10:01:58Z","updated_at":"2017-08-24T10:01:58Z","body":"@mjbvz I have read this SO answer before created this issue. According to his explains I came up that why I get suggestions when 'MyComponent just extends the Component not implements it'.\r\nIf I use `Component` as an interface, it is reasonable. But I get suggestions in extending way, I want some docs about this behaviour and I guess that it is may be caused by the newer features of TS.\r\n\r\nCould you re-open it for getting more help?"}}
{"actor":{"display_login":"zheeeng"}}