31 lines
485 B
JavaScript
31 lines
485 B
JavaScript
|
//// [instantiateGenericClassWithZeroTypeArguments.ts]
|
||
|
// no errors expected when instantiating a generic type with no type arguments provided
|
||
|
|
||
|
class C<T> {
|
||
|
x: T;
|
||
|
}
|
||
|
|
||
|
var c = new C();
|
||
|
|
||
|
class D<T, U> {
|
||
|
x: T
|
||
|
y: U
|
||
|
}
|
||
|
|
||
|
var d = new D();
|
||
|
|
||
|
|
||
|
//// [instantiateGenericClassWithZeroTypeArguments.js]
|
||
|
var C = (function () {
|
||
|
function C() {
|
||
|
}
|
||
|
return C;
|
||
|
})();
|
||
|
var c = new C();
|
||
|
var D = (function () {
|
||
|
function D() {
|
||
|
}
|
||
|
return D;
|
||
|
})();
|
||
|
var d = new D();
|