Files
tsgo/testdata/baselines/reference/submodule/compiler/declarationEmitNestedGenerics.js

29 lines
641 B
TypeScript

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