{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/27890","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/27890/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/27890/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/27890/events","html_url":"https://github.com/Microsoft/TypeScript/issues/27890","id":369815616,"node_id":"MDU6SXNzdWUzNjk4MTU2MTY=","number":27890,"title":"More accurate error message request on extending a specific type","user":{"login":"zheeeng","id":1303154,"node_id":"MDQ6VXNlcjEzMDMxNTQ=","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":113970366,"node_id":"MDU6TGFiZWwxMTM5NzAzNjY=","url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Bug","name":"Bug","color":"e11d21","default":false},{"id":306530502,"node_id":"MDU6TGFiZWwzMDY1MzA1MDI=","url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Domain:%20Error%20Messages","name":"Domain: Error Messages","color":"fef2c0","default":false},{"id":265374716,"node_id":"MDU6TGFiZWwyNjUzNzQ3MTY=","url":"https://api.github.com/repos/Microsoft/TypeScript/labels/good%20first%20issue","name":"good first issue","color":"7944ba","default":true},{"id":117630704,"node_id":"MDU6TGFiZWwxMTc2MzA3MDQ=","url":"https://api.github.com/repos/Microsoft/TypeScript/labels/help%20wanted","name":"help wanted","color":"009800","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-10-13T16:03:36Z","updated_at":"2018-10-14T07:59:43Z","closed_at":null,"author_association":"NONE","body":"As below codes showing, according to the error message, seems that `type A` is equivalent to an `interface`, but `type A2` is a strict `type` kind type\r\n\r\n```typescript\r\ntype A<T> = {\r\n    [P in keyof { foo: any }]: number\r\n}\r\n\r\ninterface B<T> extends A<T> { }\r\n\r\n\r\ntype A2<T> = {\r\n    [P in keyof T]: number\r\n}\r\n\r\ninterface B2<T> extends A2<T> {} // An interface may only extend a class or another interface.\r\n```"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/429604896","html_url":"https://github.com/Microsoft/TypeScript/issues/27890#issuecomment-429604896","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/27890","id":429604896,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTYwNDg5Ng==","user":{"login":"DanielRosenwasser","id":972891,"node_id":"MDQ6VXNlcjk3Mjg5MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/972891?v=4","gravatar_id":"","url":"https://api.github.com/users/DanielRosenwasser","html_url":"https://github.com/DanielRosenwasser","followers_url":"https://api.github.com/users/DanielRosenwasser/followers","following_url":"https://api.github.com/users/DanielRosenwasser/following{/other_user}","gists_url":"https://api.github.com/users/DanielRosenwasser/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielRosenwasser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielRosenwasser/subscriptions","organizations_url":"https://api.github.com/users/DanielRosenwasser/orgs","repos_url":"https://api.github.com/users/DanielRosenwasser/repos","events_url":"https://api.github.com/users/DanielRosenwasser/events{/privacy}","received_events_url":"https://api.github.com/users/DanielRosenwasser/received_events","type":"User","site_admin":false},"created_at":"2018-10-14T07:59:43Z","updated_at":"2018-10-14T07:59:43Z","author_association":"MEMBER","body":"Since these types don't just have properties, \"members\" might be a better word for this.\r\n\r\n```\r\nAn interface can only extend an object or intersection type with statically known members.\r\nA class can only implement an object or intersection type with statically known members.\r\n```\r\n\r\nI almost didn't want to include \"object or intersection\", but then this message doesn't work for primitives."}}
{"actor":{"display_login":"DanielRosenwasser"}}