(в самом низу playground'а)
http://www.typescriptlang.org/play/?target=6#code/PQKgUABCEQIgogMQJIDlkBVkHlWRMGGAKYAeADgPYBOALhMQHYCuAthIq-QN6QQBSAZVwQAvBADMYAL5EyVOhACWjWsWoAzAIYBjYhACC5JdnK0llRgGcIvGAAtKV2gH4AXBGfUVAcwA0fAA2lD4qHl6+ATDkWlZWAO40ACbhtN6M-nxxge4QAEaUlIHEWoxREBpcuZy05Tr2WtRWxK4eAOTxKkmU8VYAtACMAEwArANtEAA+EG3MtBp9ABwT020A1pRKi33UbTJEKmqauvoASsQAjszEzvDU1DS2fOoP1KnpmTAvNADClEnEDwDAAMwP2YFoAE9yPoDGIIAAKb5vCDnK43Wh3V5+CAxSHBLQpCAsQKBACUYgAfBAAG6bJIAbgh0P0ACEADwYaniJH3GgeEmBHF4glEjAU0TUulKRnMmEQH5aUl5XRrTncwwQABkEA5XKZYEO6m0el1StKenOVio1n0dny5sYegFbDy6jqzHuTB0kPapwAqqc9rIwDpArEbEYlE9ot4aVo1BBKGYLNZ4faYNkPNpAs1yjBKrQPDUAHRCXD5iCOZztNqV+qNZpFmZzBbLSvBUKMWuVmJxRLUIltPYwaQGmA6SxeZg6Wg0BHJ8xT3JR0xL6wUjMQWj2JRWEuL1M2cRbmAl887vcHlNTytn8+Hqd8UdM0dEWNKeOJnwtAD61foHl4mA3IIgyCVqS3JQNERABCYD4gpBD4WHV8YAgagWk9RhEUvfdH2sEtsggFwZnsWhaHIKw3GAYAJnacjKJouiKQAaggZD2Lw69133AC0LHd9cTjBN9Ewwlf09QJ4XVBFyCaDxSkhHEwzyDxFWVVV1QgmN0Mnax6AI49dPQiBWBaRwhyoZw62fdD7BKAEFJM0yZgMHQ9DMNp2i0chyECJQdATVNgAAKysSxbNc9C2j+VQmFoPoMBZbyZl8-zAuCywwoixgR1c6Q73yf5fQEYRUCItJfGgyE5KaMk7NkUyNBaeoEW4n9aH-JxaARYcyRxIyGuiksdyYBFMOPalJtGsherJMlRocxgESSBMtCpFzTP05xcS0fFKEJeFywqmImmIVb1rJNDougxERUOpIS2RX9JwBTc7Oinb6GRdNkQ8B7CWevlqBxZE-gBAH9tFYHXle-5iEE6LtsCPIEV5V4IFiVFLmuW4QYG4lmFJa7PtczDaGwm6CrJidUYRQUcTk6HHqxmxxVJ6LpGG1ySyC2g2peTbTz0qcfpB9NafQ-6ZkEdQaXUCBUEoegAHUaDWKLka+EGIcBCAQTBbWkeR1T0d+7G0TxzECZxQVOYKh3BL4TrfxVcMnX0HlVPUpVUa01lHUtG4bWaSkdK3bjxKSSTqECBEye4DQlGKdp3YtYgS3IexyDrCA1toLQPG4HRPSBaRCrJ1S7KdpkQzAUB8Bgf1BAMABxeAwAIIhvqx4x4UYYh4kMYwEVJhvgAgVX7EhBgJdKJI9oOo6Ch3KtsaU7cWRcMBfKUEtXfTz3zZB4UWcJCO+B2opM87DGaDP5eklJ7mDSAA
я сейчас не пытаюсь ответить на вопрос, мне интересно, а какие типы он должен вывести?
я бы предложил что-то вида http://www.typescriptlang.org/play/?target=6#code/PQKgBAIgogYgkgOTgFTgeQWEwBQOCmAHgA4D2ATgC5j4B2ArgLZgyPUDeOYYAUgMoYwAXjABmHAF88RMlTABLWpXzkAZgEMAxvjABBYvLTFK80rQDOYTtwAWpc5QD8ALjAPyigOYAaLmAA2pJ6Kru5evtzE6ubmAO4UACahlB60Pn4x-i5gAEakpP746rQRYKps2ayUpZo26uTm+E6uAOSxigmkseYAtACMAEwArH0tYAA+YC30lKo9ABxjky0A1qTy8z3kLZJ4ispqWjoACuoAnoHqCVDk5BRWfip35MmpngDcj7cUAPqapAl8K4GIwcipPlIcKp6LRNCYzApzKcLqQrjdngAKQiuYpnACUrkIiLAyMu12+5Ae3HkqjAGMoZ2I+FItMIADonr9-oCwABCIQiABEILB5EFeKp3DA5Ca9HItDK6n8jU+3Eh1Np9MZzNZHIpfIFYEFYTS4sl3BllDlCo0yvwqrA6ulsvlYBS9Htuxw+xUGm0YAAQkritoAEr4cxkCw6ay5YO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