This project is read-only.

Declare Events for Definition Files

Topics: Language Specification
Nov 16, 2012 at 1:53 AM

I know there has been discussion about events already, and a lot of hesitation in dealing with them inside .ts files, because of the various ways to implement events in JS. However, for .d.ts files, we need a way to be able to define events that objects throw, regardless of the actual implementation.

For example, if I was trying to create a TypeScript definition for this object:, I wouldn't have a very good way to describe the EventArgs that come back from the various events, which is one of the problems I have with JS in the first place.


Nov 20, 2012 at 5:15 PM

There were some discussions on events at and  Are these similar to what  you're working on?