Leading comments have trailing separator while trailing comments have leading space This removes the extra trailing space in the trailing comments
10 lines
374 B
JavaScript
10 lines
374 B
JavaScript
//// [returnTypeParameter.ts]
|
|
function f<T>(a: T): T { } // error, no return statement
|
|
function f2<T>(a: T): T { return T; } // bug was that this satisfied the return statement requirement
|
|
|
|
//// [returnTypeParameter.js]
|
|
function f(a) {
|
|
} // error, no return statement
|
|
function f2(a) {
|
|
return T;
|
|
} // bug was that this satisfied the return statement requirement
|