1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234
|
// @declaration: true
// @target: es5
module a {
}
module b.a {
}
module c.a.b {
import ma = a;
}
module mImport {
import d = a;
import e = b.a;
import d1 = a;
import e1 = b.a;
}
module m0 {
function f1() {
}
function f2(s: string);
function f2(n: number);
function f2(ns: any) {
}
class c1 {
public a : ()=>string;
private b: ()=>number;
private static s1;
public static s2;
}
interface i1 {
() : Object;
[n: number]: c1;
}
import m2 = a;
import m3 = b;
import m4 = b.a;
import m5 = c;
import m6 = c.a;
import m7 = c.a.b;
}
module m1 {
export function f1() {
}
export function f2(s: string);
export function f2(n: number);
export function f2(ns: any) {
}
export class c1 {
public a: () =>string;
private b: () =>number;
private static s1;
public static s2;
public d() {
return "Hello";
}
public e: { x: number; y: string; };
constructor (public n, public n2: number, private n3, private n4: string) {
}
}
export interface i1 {
() : Object;
[n: number]: c1;
}
import m2 = a;
import m3 = b;
import m4 = b.a;
import m5 = c;
import m6 = c.a;
import m7 = c.a.b;
}
module m {
export module m2 {
var a = 10;
export var b: number;
}
export module m3 {
export var c: number;
}
}
module m {
export module m25 {
export module m5 {
export var c: number;
}
}
}
module m13 {
export module m4 {
export module m2 {
export module m3 {
export var c: number;
}
}
export function f() {
return 20;
}
}
}
declare module m4 {
export var b;
}
declare module m5 {
export var c;
}
declare module m43 {
export var b;
}
declare module m55 {
export var c;
}
declare module "m3" {
export var b: number;
}
module exportTests {
export class C1_public {
private f2() {
return 30;
}
public f3() {
return "string";
}
}
class C2_private {
private f2() {
return 30;
}
public f3() {
return "string";
}
}
export class C3_public {
private getC2_private() {
return new C2_private();
}
private setC2_private(arg: C2_private) {
}
private get c2() {
return new C2_private();
}
public getC1_public() {
return new C1_public();
}
public setC1_public(arg: C1_public) {
}
public get c1() {
return new C1_public();
}
}
}
declare module mAmbient {
class C {
public myProp: number;
}
function foo() : C;
var aVar: C;
interface B {
x: number;
y: C;
}
enum e {
x,
y,
z
}
module m3 {
class C {
public myProp: number;
}
function foo(): C;
var aVar: C;
interface B {
x: number;
y: C;
}
enum e {
x,
y,
z
}
}
}
function foo() {
return mAmbient.foo();
}
var cVar = new mAmbient.C();
var aVar = mAmbient.aVar;
var bB: mAmbient.B;
var eVar: mAmbient.e;
function m3foo() {
return mAmbient.m3.foo();
}
var m3cVar = new mAmbient.m3.C();
var m3aVar = mAmbient.m3.aVar;
var m3bB: mAmbient.m3.B;
var m3eVar: mAmbient.m3.e;
|