Microsoft/TypeScript — pull request #1204 by DanielRosenwasser (2014-11-19 02:16:04+00:00)
Title: Tagged Template Signature Help Support in Language Service

## Signature Help for Tagged Templates

This PR enables signature help support in the language service for tagged template strings.

The idea is that a tagged template is a bit of an implicit function invocation. Whenever a user requests signature help (or it is triggered by the consuming environment), we should figure out what function a tag refers to, which overload should be chosen, and which parameter is currently being fed.

### Substitution-Argument Correspondence
When a template expression is tagged, each substitution expression corresponds to an argument in invoking that tag. Specifically, the *Nth* substitution expression in a tagged template expression is the *(N+1)th* argument in an invocation.

### TemplateStringsArray Argument
Whenever the cursor lies within a template literal (whether a no-substitution literal, or a fragment of a template expression), the parameter in question is the first parameter of the tag in question. This is because each template literal in a tagged template corresponds to an array element in the cooked/raw array object specified in ES6. This means that as the cursor moves through a template expression, parameters will not be highlighted from left-to-right consistently.

![sighelptemplates2](https://cloud.githubusercontent.com/assets/972891/5099607/8f80a1ce-6f4d-11e4-8d8e-c7595b2b14b7.gif)