{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/2509","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/2509/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/2509/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/2509/events","html_url":"https://github.com/Microsoft/TypeScript/issues/2509","id":64528448,"number":2509,"title":"Feature request: first-class labels for extensible rows / koka","user":{"login":"Ziriax","id":2389359,"avatar_url":"https://avatars.githubusercontent.com/u/2389359?v=3","gravatar_id":"","url":"https://api.github.com/users/Ziriax","html_url":"https://github.com/Ziriax","followers_url":"https://api.github.com/users/Ziriax/followers","following_url":"https://api.github.com/users/Ziriax/following{/other_user}","gists_url":"https://api.github.com/users/Ziriax/gists{/gist_id}","starred_url":"https://api.github.com/users/Ziriax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ziriax/subscriptions","organizations_url":"https://api.github.com/users/Ziriax/orgs","repos_url":"https://api.github.com/users/Ziriax/repos","events_url":"https://api.github.com/users/Ziriax/events{/privacy}","received_events_url":"https://api.github.com/users/Ziriax/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-26T13:37:10Z","updated_at":"2015-03-26T15:27:58Z","closed_at":null,"body":"It would be very nice have real extensible row polymorphism in Typescript, that also works with generics.\r\n\r\nSo having type constructions that allow adding and removing 'keys' aka labels.\r\n\r\nI tried adding labels using interfaces, but that does not work, since you cannot extend from a generic type?\r\n\r\n```\r\ninterface IWithName<T> extends T {\r\n   name: string\r\n}\r\n```\r\n\r\nSee Microsoft's research language Koka and also this old  [paper](http://research.microsoft.com/pubs/64501/fclabels.pdf), both from Daan Leijen\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/86568921","html_url":"https://github.com/Microsoft/TypeScript/issues/2509#issuecomment-86568921","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/2509","id":86568921,"user":{"login":"Ziriax","id":2389359,"avatar_url":"https://avatars.githubusercontent.com/u/2389359?v=3","gravatar_id":"","url":"https://api.github.com/users/Ziriax","html_url":"https://github.com/Ziriax","followers_url":"https://api.github.com/users/Ziriax/followers","following_url":"https://api.github.com/users/Ziriax/following{/other_user}","gists_url":"https://api.github.com/users/Ziriax/gists{/gist_id}","starred_url":"https://api.github.com/users/Ziriax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ziriax/subscriptions","organizations_url":"https://api.github.com/users/Ziriax/orgs","repos_url":"https://api.github.com/users/Ziriax/repos","events_url":"https://api.github.com/users/Ziriax/events{/privacy}","received_events_url":"https://api.github.com/users/Ziriax/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T15:27:58Z","updated_at":"2015-03-26T15:27:58Z","body":"Thanks for the fast reply.\r\n\r\nThat's too bad, since \"runtime row polymorphism\" happens a lot in Javascript (by its dynamic nature), and we currently can't model that generically in Typescript IMO.\r\n\r\n\r\n\r\n"}}