borisyankov/DefinitelyTyped — pull request #1497 by johnnyreilly (2014-01-03 12:33:53+00:00)
Title: Q: moved from module to interface approach

To cater for a likely Declaration Merging bug in TypeScript 0.9.5. You can find details on this [here](https://typescript.codeplex.com/workitem/1995) - also take a look at my comment [here](https://typescript.codeplex.com/workitem/1995#CommentContainer18).

There have been changes to the tests purely because interfaces are no longer nested in a module. So the following changes in interface name apply:

```Q.Promise``` => ```QPromise```
```Q.IPromise``` => ```QIPromise```
```Q.Deferred``` => ```QDeferred```
```Q.PromiseState``` => ```QPromiseState```

The tests are otherwise unchanged and still pass on my machine.

I have *no* intention to merge this myself without some input first from other Q users - ideally from @AndrewGaspar and Barrie Nemetchek.

If this is merged then anyone who has reference to ```Q.Promise```, ```Q.IPromise```, ```Q.Deferred``` or ```Q.PromiseState``` will need to change these entries in their code.

For what it's worth I've only made these changes because of the TypeScript 0.9.5 bug. But if other people are holding off upgrading to TS 0.9.5 because of this then this will allow them to get round this.