I wonder if they could get the TypeScript compiler to do something similar in future.
For example, As a front-end heavy language, talking with other systems is quite ordinary -- a very useful case is reflecting GraphQL or SQL type without code generation.