{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6/events","html_url":"https://github.com/Microsoft/TypeScript/issues/6","id":37902683,"number":6,"title":"Suggestion: abstract classes","user":{"login":"RyanCavanaugh","id":6685088,"avatar_url":"https://avatars.githubusercontent.com/u/6685088?v=3","gravatar_id":"","url":"https://api.github.com/users/RyanCavanaugh","html_url":"https://github.com/RyanCavanaugh","followers_url":"https://api.github.com/users/RyanCavanaugh/followers","following_url":"https://api.github.com/users/RyanCavanaugh/following{/other_user}","gists_url":"https://api.github.com/users/RyanCavanaugh/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanCavanaugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanCavanaugh/subscriptions","organizations_url":"https://api.github.com/users/RyanCavanaugh/orgs","repos_url":"https://api.github.com/users/RyanCavanaugh/repos","events_url":"https://api.github.com/users/RyanCavanaugh/events{/privacy}","received_events_url":"https://api.github.com/users/RyanCavanaugh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/In%20Discussion","name":"In Discussion","color":"556b75"},{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Suggestion","name":"Suggestion","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":64,"created_at":"2014-07-15T16:45:03Z","updated_at":"2015-02-12T16:51:24Z","closed_at":null,"body":"Support an `abstract` keyword for classes and their methods\r\n\r\nExamples:\r\n```TypeScript\r\nabstract class Base {\r\n    abstract getThing(): string;\r\n    getOtherThing() { return 'hello'; }\r\n}\r\nvar x = new Base(); // Error, 'Base' is abstract\r\n\r\n// Error, must either be 'abstract' or implement concrete 'getThing'\r\nclass Derived1 extends Base { }\r\n\r\nclass Derived2 extends Base {\r\n    getThing() { return 'hello'; }\r\n    foo() { super.getThing(); } // Error: cannot invoke abstract members through 'super'\r\n}\r\nvar x = new Derived2(); // OK\r\nvar y: Base = new Derived2(); // Also OK\r\ny.getThing(); // OK\r\ny.getOtherThing(); // OK\r\n\r\nabstract class Empty { } // OK\r\n```"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/74106393","html_url":"https://github.com/Microsoft/TypeScript/issues/6#issuecomment-74106393","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6","id":74106393,"user":{"login":"bwindels","id":274386,"avatar_url":"https://avatars.githubusercontent.com/u/274386?v=3","gravatar_id":"","url":"https://api.github.com/users/bwindels","html_url":"https://github.com/bwindels","followers_url":"https://api.github.com/users/bwindels/followers","following_url":"https://api.github.com/users/bwindels/following{/other_user}","gists_url":"https://api.github.com/users/bwindels/gists{/gist_id}","starred_url":"https://api.github.com/users/bwindels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwindels/subscriptions","organizations_url":"https://api.github.com/users/bwindels/orgs","repos_url":"https://api.github.com/users/bwindels/repos","events_url":"https://api.github.com/users/bwindels/events{/privacy}","received_events_url":"https://api.github.com/users/bwindels/received_events","type":"User","site_admin":false},"created_at":"2015-02-12T16:51:24Z","updated_at":"2015-02-12T16:51:24Z","body":"Thinking about the above example. I don't know how elaborate the type system is inside the compiler, but wouldn't the compiler be able to determine in the example above that the ```makeMaybe()``` function receives constructor of an abstract class and in some cases that constructor function is used with the ```new``` operator inside the function?"}}