8 lines
118 B
TypeScript
8 lines
118 B
TypeScript
function g<T>(x: T): T {
|
|
return x;
|
|
}
|
|
|
|
function f<S extends { foo: string }>(x: S) {
|
|
var y = g(x);
|
|
y;
|
|
}
|