=== tests/cases/compiler/declarationEmitNestedGenerics.ts === function f(p: T) { >f : (p: T) => (x: T) => typeof p >p : T let g: (x: T) => typeof p = null as any; >g : (x: T) => typeof p >x : T >p : T >null as any : any >null : null return g; >g : (x: T) => T } function g(x: T) { >g : (x: T) => T extends (infer T)[] ? T : T >x : T let y: typeof x extends (infer T)[] ? T : typeof x = null as any; >y : T extends (infer T)[] ? T : T >x : T >x : T >null as any : any >null : null return y; >y : T extends (infer T)[] ? T : T }