madskristensen/WebEssentials2013 — pull request #291 by fsoikin (2013-12-10 02:22:41+00:00)
Title: Made TypeScript Intellisense correctly process properties of complex types

Made TypeScript Intellisense correctly process properties of complex types: rather than just generate "Object", the IntellisenseWriter now appropriately specifies the target type. In particular:

* If the property type is a primitive, string, or DateTime, then it is translated as before - to either Number, String, Boolean, or Date.
* If the type is a fellow TypeScript-facing class (i.e. also has a generated .d.ts file), then the full TypeScript-side name of that class is used.
* Otherwise, an inline TypeScript interface definition is generated, recursively applying these rules to all sub-properties of the type.
* If a type reference cycle is encountered while generating the inline interface definition (i.e. some type in the hierarchy references itself either directly or through other types), then the inline type is generated down to the first repetition of the cycle, at which point the type is rendered as "any".
* Static and non-public properties are ignored.

### For example: ###

#### Source: ####
```
public class A {
public string X { get; set; }
public int Y { get; set; }
}

public class B {
public string P { get; set; }
public A Q { get; set; } // Fellow TypeScript-facing class A
public Tuple R { get; set; }
}
```

#### Result: ####
```
declare module server {
interface A {
X: String;
Y: Number;
}
interface B {
P: String;
Q: server.A;
R: {
Item1: Number;
Item2: String;
};
}
}
```