Looks like some work in this direction landed in #125, but this is not working quite yet because of what seems to be a TypeScript shortcoming and/or bug. Here's a failing test case:
brandonbloom@b4e721c
I believe this issue tracks the problem upstream:
microsoft/TypeScript#36931
Originally posted by @brandonbloom in #110 (comment)