{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3745","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3745/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3745/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3745/events","html_url":"https://github.com/Microsoft/TypeScript/issues/3745","id":93127131,"number":3745,"title":"Support getter setters in interfaces","user":{"login":"mhevery","id":111951,"avatar_url":"https://avatars.githubusercontent.com/u/111951?v=3","gravatar_id":"","url":"https://api.github.com/users/mhevery","html_url":"https://github.com/mhevery","followers_url":"https://api.github.com/users/mhevery/followers","following_url":"https://api.github.com/users/mhevery/following{/other_user}","gists_url":"https://api.github.com/users/mhevery/gists{/gist_id}","starred_url":"https://api.github.com/users/mhevery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhevery/subscriptions","organizations_url":"https://api.github.com/users/mhevery/orgs","repos_url":"https://api.github.com/users/mhevery/repos","events_url":"https://api.github.com/users/mhevery/events{/privacy}","received_events_url":"https://api.github.com/users/mhevery/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/By%20Design","name":"By Design","color":"fbca04"},{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Canonical","name":"Canonical","color":"000000"},{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Duplicate","name":"Duplicate","color":"f7c6c7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-05T17:12:01Z","updated_at":"2015-10-06T17:02:55Z","closed_at":"2015-07-07T15:27:59Z","body":"Classes support getters / setters\r\n\r\n```\r\nclass MyClass {\r\n  get value(): string { return 'value'; }\r\n  set value(v: string): string {}\r\n}\r\n```\r\n\r\nbut the corresponding interface is not supported:\r\n\r\n```\r\ninterface MyInterface {\r\n  get value(): string;\r\n  set value(v: string): string;\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/145928573","html_url":"https://github.com/Microsoft/TypeScript/issues/3745#issuecomment-145928573","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3745","id":145928573,"user":{"login":"alexeagle","id":47395,"avatar_url":"https://avatars.githubusercontent.com/u/47395?v=3","gravatar_id":"","url":"https://api.github.com/users/alexeagle","html_url":"https://github.com/alexeagle","followers_url":"https://api.github.com/users/alexeagle/followers","following_url":"https://api.github.com/users/alexeagle/following{/other_user}","gists_url":"https://api.github.com/users/alexeagle/gists{/gist_id}","starred_url":"https://api.github.com/users/alexeagle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexeagle/subscriptions","organizations_url":"https://api.github.com/users/alexeagle/orgs","repos_url":"https://api.github.com/users/alexeagle/repos","events_url":"https://api.github.com/users/alexeagle/events{/privacy}","received_events_url":"https://api.github.com/users/alexeagle/received_events","type":"User","site_admin":false},"created_at":"2015-10-06T17:02:55Z","updated_at":"2015-10-06T17:02:55Z","body":"Now that we have `abstract`, I think this problem is solved:\r\n```\r\nabstract class HasReadonlyProp {\r\n  abstract get foo(): number;\r\n}\r\nclass HasReadonlyPropImpl extends HasReadonlyProp {\r\n  get foo(): number { return 1; }\r\n}\r\n```\r\n```\r\nfunction ClientCode() {\r\n  let h = new HasReadonlyProp();\r\n  console.log(h.foo); //=> 1\r\n  h.foo = 2; //=> typechecking error \r\n}\r\n```"}}