5 lines
No EOL
123 B
TypeScript
5 lines
No EOL
123 B
TypeScript
function foo<T extends { m(p: string): number }>(x: T): T {
|
|
return undefined;
|
|
}
|
|
|
|
foo({ m(x) { return x.length } }); |