Suggestion: typedefs

Topics: Language Specification
Oct 2, 2012 at 7:26 PM

In addition to my other suggestion for multiple type specifiers, it would be nice to have typedefs as in C++ or other languages.

As TypeScript will also support Generics in the future as per the spec (see here), that'll be also a use case.

I could imagine something like this:

// JSON style
typedef [string, number] TestData;

typedef string|number TestData;

typedef string, number TestData

// or with announced generics
typedef Vector<number> TestData

interface Test {
  data: TestData
Oct 5, 2012 at 6:33 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.