//// [generativeRecursionWithTypeOf.ts] class C { static foo(x: number) { } type: T; } module M { export function f(x: typeof C) { return new x(); } } //// [generativeRecursionWithTypeOf.js] var C = (function () { function C() { } C.foo = function (x) { }; return C; })(); var M; (function (M) { function f(x) { return new x(); } M.f = f; })(M || (M = {}));