Microsoft/TypeScript — pull request #1169 by CyrusNajmabadi (2014-11-15 00:27:34+00:00)
Title: Function and constructor types in the syntax tree.

For incremental parsing purposes, it's important that different pieces of syntax generate different AST nodes. If we don't have that invariant, then when the incremental parser reuses a node, it may do so in a context where it would not be ok. A good example of that are function and constructor types. i.e.:

```
() => X or
new () => Y
```

Currently, we parse these types straight into the AST as if you had written:

```
{ () : X } or
{ new () : Y }
```

This is problematic because the tree now says "i have a TypeLiteral" when really you wrote a constructor or function type. This can affect features like incremental parsing in the following manner. Say you have:

```() => X```

And you add ```interface I``` before it, creating:

```interface I () => x```

This shouldn't parse, but with incremental parsing on, it would. That's because the parser would say "after the name of the interface, i need to parse a TypeLiteral. And that's exactly what it would see in the tree.

Now, it will see a 'FunctoinType' and will know it cannot parse that out.