Leading comments have trailing separator while trailing comments have leading space This removes the extra trailing space in the trailing comments
17 lines
412 B
JavaScript
17 lines
412 B
JavaScript
//// [genericTypeAssertions1.ts]
|
|
class A<T> { foo(x: T) { }}
|
|
var foo = new A<number>();
|
|
var r: A<string> = <A<number>>new A(); // error
|
|
var r2: A<number> = <A<A<number>>>foo; // error
|
|
|
|
//// [genericTypeAssertions1.js]
|
|
var A = (function () {
|
|
function A() {
|
|
}
|
|
A.prototype.foo = function (x) {
|
|
};
|
|
return A;
|
|
})();
|
|
var foo = new A();
|
|
var r = new A(); // error
|
|
var r2 = foo; // error
|