As of TypeScript 1.0, there is no simple way for modeling a function that has varied return types that are not compatible (you can define an interface
For example that returns objects that share a common base type, but an array and a string do not).
You'll need to use any
to represent the returned values.
You might follow and vote up this on CodePlex which is a suggestion to implement something like a Type Union.