This project is read-only.

Two suggestions - "override" keyword and attributes

Topics: Language Specification
Apr 18, 2013 at 7:02 PM

I've been enjoying getting to know TypeScript over the last two weeks, and have just about finished the conversion of an MVC project consisting of 100+ JavaScript files to TypeScript. This exercise allowed me to standardize an object model that had grown a bit chaotically at times as new features were rushed into the codebase (shh, don't tell anyone). Now on to my suggestions...

I'd like to propose that the language support the "override" keyword. This could be introduced in a standalone manner, and show all methods of the base classes that could be overridden or in conjunction with "virtual", which would limit the methods that could be overridden in the base.

The second suggestion is for attributes. As I worked in the *.d.ts files I thought it would be great if I could emit information similar to the ObsoleteAttribute in C#. This would be help library developers inform their consumers about changes in the code.

Thanks for all the great work you've done to date!

Apr 23, 2013 at 2:10 AM
Hi Sean,

Thanks for the suggestions. I think you'll find people who might tend to agree with you on the issue tracker, which is also where feature requests can get voted up both other developers. Along the lines of virtual, for example, there's a feature request for abstract classes (

In general, our class syntax is trying to align with the ECMAScript 6 proposal, which will be the next version of JavaScript. With that as our goal, we've resisted extending features too much beyond the proposal.