2014-07-13 01:04:16 +02:00
|
|
|
//// [declFileGenericType.ts]
|
|
|
|
export module C {
|
|
|
|
export class A<T>{ }
|
|
|
|
export class B { }
|
|
|
|
|
|
|
|
export function F<T>(x: T): A<B> { return null; }
|
|
|
|
export function F2<T>(x: T): C.A<C.B> { return null; }
|
|
|
|
export function F3<T>(x: T): C.A<C.B>[] { return null; }
|
|
|
|
export function F4<T extends A<B>>(x: T): Array<C.A<C.B>> { return null; }
|
|
|
|
|
|
|
|
export function F5<T>(): T { return null; }
|
|
|
|
|
|
|
|
export function F6<T extends A<B>>(x: T): T { return null; }
|
|
|
|
|
|
|
|
export class D<T>{
|
|
|
|
|
|
|
|
constructor(public val: T) { }
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export var a: C.A<C.B>;
|
|
|
|
|
|
|
|
export var b = C.F;
|
|
|
|
export var c = C.F2;
|
|
|
|
export var d = C.F3;
|
|
|
|
export var e = C.F4;
|
|
|
|
|
|
|
|
export var x = (new C.D<C.A<C.B>>(new C.A<C.B>())).val;
|
|
|
|
|
|
|
|
export function f<T extends C.A<C.B>>() { }
|
|
|
|
|
|
|
|
export var g = C.F5<C.A<C.B>>();
|
|
|
|
|
|
|
|
export class h extends C.A<C.B>{ }
|
|
|
|
|
|
|
|
export interface i extends C.A<C.B> { }
|
|
|
|
|
|
|
|
export var j = C.F6;
|
|
|
|
|
|
|
|
|
|
|
|
//// [declFileGenericType.js]
|
|
|
|
var __extends = this.__extends || function (d, b) {
|
|
|
|
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
|
|
function __() { this.constructor = d; }
|
|
|
|
__.prototype = b.prototype;
|
|
|
|
d.prototype = new __();
|
|
|
|
};
|
2014-09-07 02:40:19 +02:00
|
|
|
var C;
|
2014-07-13 01:04:16 +02:00
|
|
|
(function (C) {
|
|
|
|
var A = (function () {
|
|
|
|
function A() {
|
|
|
|
}
|
|
|
|
return A;
|
|
|
|
})();
|
|
|
|
C.A = A;
|
|
|
|
var B = (function () {
|
|
|
|
function B() {
|
|
|
|
}
|
|
|
|
return B;
|
|
|
|
})();
|
|
|
|
C.B = B;
|
|
|
|
function F(x) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
C.F = F;
|
|
|
|
function F2(x) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
C.F2 = F2;
|
|
|
|
function F3(x) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
C.F3 = F3;
|
|
|
|
function F4(x) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
C.F4 = F4;
|
|
|
|
function F5() {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
C.F5 = F5;
|
|
|
|
function F6(x) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
C.F6 = F6;
|
|
|
|
var D = (function () {
|
|
|
|
function D(val) {
|
|
|
|
this.val = val;
|
|
|
|
}
|
|
|
|
return D;
|
|
|
|
})();
|
|
|
|
C.D = D;
|
2014-09-07 02:40:19 +02:00
|
|
|
})(C = exports.C || (exports.C = {}));
|
2014-07-13 01:04:16 +02:00
|
|
|
exports.a;
|
|
|
|
exports.b = C.F;
|
|
|
|
exports.c = C.F2;
|
|
|
|
exports.d = C.F3;
|
|
|
|
exports.e = C.F4;
|
|
|
|
exports.x = (new C.D(new C.A())).val;
|
|
|
|
function f() {
|
|
|
|
}
|
|
|
|
exports.f = f;
|
|
|
|
exports.g = C.F5();
|
|
|
|
var h = (function (_super) {
|
|
|
|
__extends(h, _super);
|
|
|
|
function h() {
|
|
|
|
_super.apply(this, arguments);
|
|
|
|
}
|
|
|
|
return h;
|
|
|
|
})(C.A);
|
|
|
|
exports.h = h;
|
|
|
|
exports.j = C.F6;
|
|
|
|
|
|
|
|
|
|
|
|
//// [declFileGenericType.d.ts]
|
|
|
|
export declare module C {
|
|
|
|
class A<T> {
|
|
|
|
}
|
|
|
|
class B {
|
|
|
|
}
|
2014-07-12 01:36:06 +02:00
|
|
|
function F<T>(x: T): A<B>;
|
2014-11-11 00:39:01 +01:00
|
|
|
function F2<T>(x: T): C.A<C.B>;
|
|
|
|
function F3<T>(x: T): C.A<C.B>[];
|
|
|
|
function F4<T extends A<B>>(x: T): Array<C.A<C.B>>;
|
2014-07-12 01:36:06 +02:00
|
|
|
function F5<T>(): T;
|
|
|
|
function F6<T extends A<B>>(x: T): T;
|
2014-07-13 01:04:16 +02:00
|
|
|
class D<T> {
|
2014-07-12 01:36:06 +02:00
|
|
|
val: T;
|
|
|
|
constructor(val: T);
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
}
|
2014-07-16 20:30:14 +02:00
|
|
|
export declare var a: C.A<C.B>;
|
2014-08-09 01:15:09 +02:00
|
|
|
export declare var b: typeof C.F;
|
|
|
|
export declare var c: typeof C.F2;
|
|
|
|
export declare var d: typeof C.F3;
|
|
|
|
export declare var e: typeof C.F4;
|
2014-07-16 20:30:14 +02:00
|
|
|
export declare var x: C.A<C.B>;
|
|
|
|
export declare function f<T extends C.A<C.B>>(): void;
|
|
|
|
export declare var g: C.A<C.B>;
|
|
|
|
export declare class h extends C.A<C.B> {
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
2014-07-16 20:30:14 +02:00
|
|
|
export interface i extends C.A<C.B> {
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
2014-08-09 01:15:09 +02:00
|
|
|
export declare var j: typeof C.F6;
|