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 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548
|
=== tests/cases/compiler/genericClassWithStaticFactory.ts ===
module Editor {
>Editor : Symbol(Editor, Decl(genericClassWithStaticFactory.ts, 0, 0))
export class List<T> {
>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22))
public next: List<T>;
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22))
public prev: List<T>;
>prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22))
private listFactory: ListFactory<T>;
>listFactory : Symbol(List.listFactory, Decl(genericClassWithStaticFactory.ts, 4, 29))
>ListFactory : Symbol(ListFactory, Decl(genericClassWithStaticFactory.ts, 106, 5))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22))
constructor(public isHead: boolean, public data: T) {
>isHead : Symbol(List.isHead, Decl(genericClassWithStaticFactory.ts, 7, 20))
>data : Symbol(List.data, Decl(genericClassWithStaticFactory.ts, 7, 43))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22))
this.listFactory = new ListFactory<T>();
>this.listFactory : Symbol(List.listFactory, Decl(genericClassWithStaticFactory.ts, 4, 29))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>listFactory : Symbol(List.listFactory, Decl(genericClassWithStaticFactory.ts, 4, 29))
>ListFactory : Symbol(ListFactory, Decl(genericClassWithStaticFactory.ts, 106, 5))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22))
}
public add(data: T): List<T> {
>add : Symbol(List.add, Decl(genericClassWithStaticFactory.ts, 10, 9))
>data : Symbol(data, Decl(genericClassWithStaticFactory.ts, 12, 19))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22))
>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22))
var entry = this.listFactory.MakeEntry(data);
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 13, 15))
>this.listFactory.MakeEntry : Symbol(ListFactory.MakeEntry, Decl(genericClassWithStaticFactory.ts, 115, 9))
>this.listFactory : Symbol(List.listFactory, Decl(genericClassWithStaticFactory.ts, 4, 29))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>listFactory : Symbol(List.listFactory, Decl(genericClassWithStaticFactory.ts, 4, 29))
>MakeEntry : Symbol(ListFactory.MakeEntry, Decl(genericClassWithStaticFactory.ts, 115, 9))
>data : Symbol(data, Decl(genericClassWithStaticFactory.ts, 12, 19))
this.prev.next = entry;
>this.prev.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>this.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 13, 15))
entry.next = this;
>entry.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 13, 15))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
entry.prev = this.prev;
>entry.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 13, 15))
>prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>this.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
this.prev = entry;
>this.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 13, 15))
return entry;
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 13, 15))
}
public count(): number {
>count : Symbol(List.count, Decl(genericClassWithStaticFactory.ts, 20, 9))
var entry: List<T>;
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 23, 15))
>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22))
var i: number;
>i : Symbol(i, Decl(genericClassWithStaticFactory.ts, 24, 15))
entry = this.next;
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 23, 15))
>this.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
for (i = 0; !(entry.isHead); i++) {
>i : Symbol(i, Decl(genericClassWithStaticFactory.ts, 24, 15))
>entry.isHead : Symbol(List.isHead, Decl(genericClassWithStaticFactory.ts, 7, 20))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 23, 15))
>isHead : Symbol(List.isHead, Decl(genericClassWithStaticFactory.ts, 7, 20))
>i : Symbol(i, Decl(genericClassWithStaticFactory.ts, 24, 15))
entry = entry.next;
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 23, 15))
>entry.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 23, 15))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
}
return (i);
>i : Symbol(i, Decl(genericClassWithStaticFactory.ts, 24, 15))
}
public isEmpty(): boolean {
>isEmpty : Symbol(List.isEmpty, Decl(genericClassWithStaticFactory.ts, 32, 9))
return (this.next == this);
>this.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
}
public first(): T {
>first : Symbol(List.first, Decl(genericClassWithStaticFactory.ts, 36, 9))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22))
if (this.isEmpty())
>this.isEmpty : Symbol(List.isEmpty, Decl(genericClassWithStaticFactory.ts, 32, 9))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>isEmpty : Symbol(List.isEmpty, Decl(genericClassWithStaticFactory.ts, 32, 9))
{
return this.next.data;
>this.next.data : Symbol(List.data, Decl(genericClassWithStaticFactory.ts, 7, 43))
>this.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>data : Symbol(List.data, Decl(genericClassWithStaticFactory.ts, 7, 43))
}
else {
return null;
}
}
public pushEntry(entry: List<T>): void {
>pushEntry : Symbol(List.pushEntry, Decl(genericClassWithStaticFactory.ts, 46, 9))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 48, 25))
>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22))
entry.isHead = false;
>entry.isHead : Symbol(List.isHead, Decl(genericClassWithStaticFactory.ts, 7, 20))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 48, 25))
>isHead : Symbol(List.isHead, Decl(genericClassWithStaticFactory.ts, 7, 20))
entry.next = this.next;
>entry.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 48, 25))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>this.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
entry.prev = this;
>entry.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 48, 25))
>prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
this.next = entry;
>this.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 48, 25))
entry.next.prev = entry; // entry.next.prev does not show intellisense, but entry.prev.prev does
>entry.next.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>entry.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 48, 25))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 48, 25))
}
public push(data: T): void {
>push : Symbol(List.push, Decl(genericClassWithStaticFactory.ts, 54, 9))
>data : Symbol(data, Decl(genericClassWithStaticFactory.ts, 56, 20))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22))
var entry = this.listFactory.MakeEntry(data);
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 57, 15))
>this.listFactory.MakeEntry : Symbol(ListFactory.MakeEntry, Decl(genericClassWithStaticFactory.ts, 115, 9))
>this.listFactory : Symbol(List.listFactory, Decl(genericClassWithStaticFactory.ts, 4, 29))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>listFactory : Symbol(List.listFactory, Decl(genericClassWithStaticFactory.ts, 4, 29))
>MakeEntry : Symbol(ListFactory.MakeEntry, Decl(genericClassWithStaticFactory.ts, 115, 9))
>data : Symbol(data, Decl(genericClassWithStaticFactory.ts, 56, 20))
entry.data = data;
>entry.data : Symbol(List.data, Decl(genericClassWithStaticFactory.ts, 7, 43))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 57, 15))
>data : Symbol(List.data, Decl(genericClassWithStaticFactory.ts, 7, 43))
>data : Symbol(data, Decl(genericClassWithStaticFactory.ts, 56, 20))
entry.isHead = false;
>entry.isHead : Symbol(List.isHead, Decl(genericClassWithStaticFactory.ts, 7, 20))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 57, 15))
>isHead : Symbol(List.isHead, Decl(genericClassWithStaticFactory.ts, 7, 20))
entry.next = this.next;
>entry.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 57, 15))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>this.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
entry.prev = this;
>entry.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 57, 15))
>prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
this.next = entry;
>this.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 57, 15))
entry.next.prev = entry; // entry.next.prev does not show intellisense, but entry.prev.prev does
>entry.next.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>entry.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 57, 15))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 57, 15))
}
public popEntry(head: List<T>): List<T> {
>popEntry : Symbol(List.popEntry, Decl(genericClassWithStaticFactory.ts, 64, 9))
>head : Symbol(head, Decl(genericClassWithStaticFactory.ts, 66, 24))
>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22))
>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22))
if (this.next.isHead) {
>this.next.isHead : Symbol(List.isHead, Decl(genericClassWithStaticFactory.ts, 7, 20))
>this.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>isHead : Symbol(List.isHead, Decl(genericClassWithStaticFactory.ts, 7, 20))
return null;
}
else {
return this.listFactory.RemoveEntry(this.next);
>this.listFactory.RemoveEntry : Symbol(ListFactory.RemoveEntry, Decl(genericClassWithStaticFactory.ts, 122, 9))
>this.listFactory : Symbol(List.listFactory, Decl(genericClassWithStaticFactory.ts, 4, 29))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>listFactory : Symbol(List.listFactory, Decl(genericClassWithStaticFactory.ts, 4, 29))
>RemoveEntry : Symbol(ListFactory.RemoveEntry, Decl(genericClassWithStaticFactory.ts, 122, 9))
>this.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
}
}
public insertEntry(entry: List<T>): List<T> {
>insertEntry : Symbol(List.insertEntry, Decl(genericClassWithStaticFactory.ts, 73, 9))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 75, 27))
>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22))
>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22))
entry.isHead = false;
>entry.isHead : Symbol(List.isHead, Decl(genericClassWithStaticFactory.ts, 7, 20))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 75, 27))
>isHead : Symbol(List.isHead, Decl(genericClassWithStaticFactory.ts, 7, 20))
this.prev.next = entry;
>this.prev.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>this.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 75, 27))
entry.next = this;
>entry.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 75, 27))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
entry.prev = this.prev;
>entry.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 75, 27))
>prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>this.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
this.prev = entry;
>this.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 75, 27))
return entry;
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 75, 27))
}
public insertAfter(data: T): List<T> {
>insertAfter : Symbol(List.insertAfter, Decl(genericClassWithStaticFactory.ts, 82, 9))
>data : Symbol(data, Decl(genericClassWithStaticFactory.ts, 84, 27))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22))
>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22))
var entry: List<T> = this.listFactory.MakeEntry(data);
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 85, 15))
>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22))
>this.listFactory.MakeEntry : Symbol(ListFactory.MakeEntry, Decl(genericClassWithStaticFactory.ts, 115, 9))
>this.listFactory : Symbol(List.listFactory, Decl(genericClassWithStaticFactory.ts, 4, 29))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>listFactory : Symbol(List.listFactory, Decl(genericClassWithStaticFactory.ts, 4, 29))
>MakeEntry : Symbol(ListFactory.MakeEntry, Decl(genericClassWithStaticFactory.ts, 115, 9))
>data : Symbol(data, Decl(genericClassWithStaticFactory.ts, 84, 27))
entry.next = this.next;
>entry.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 85, 15))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>this.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
entry.prev = this;
>entry.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 85, 15))
>prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
this.next = entry;
>this.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 85, 15))
entry.next.prev = entry;// entry.next.prev does not show intellisense, but entry.prev.prev does
>entry.next.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>entry.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 85, 15))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 85, 15))
return entry;
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 85, 15))
}
public insertEntryBefore(entry: List<T>): List<T> {
>insertEntryBefore : Symbol(List.insertEntryBefore, Decl(genericClassWithStaticFactory.ts, 91, 9))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 93, 33))
>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22))
>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22))
this.prev.next = entry;
>this.prev.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>this.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 93, 33))
entry.next = this;
>entry.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 93, 33))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
entry.prev = this.prev;
>entry.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 93, 33))
>prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>this.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
this.prev = entry;
>this.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 93, 33))
return entry;
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 93, 33))
}
public insertBefore(data: T): List<T> {
>insertBefore : Symbol(List.insertBefore, Decl(genericClassWithStaticFactory.ts, 100, 9))
>data : Symbol(data, Decl(genericClassWithStaticFactory.ts, 102, 28))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22))
>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22))
var entry = this.listFactory.MakeEntry(data);
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 103, 15))
>this.listFactory.MakeEntry : Symbol(ListFactory.MakeEntry, Decl(genericClassWithStaticFactory.ts, 115, 9))
>this.listFactory : Symbol(List.listFactory, Decl(genericClassWithStaticFactory.ts, 4, 29))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>listFactory : Symbol(List.listFactory, Decl(genericClassWithStaticFactory.ts, 4, 29))
>MakeEntry : Symbol(ListFactory.MakeEntry, Decl(genericClassWithStaticFactory.ts, 115, 9))
>data : Symbol(data, Decl(genericClassWithStaticFactory.ts, 102, 28))
return this.insertEntryBefore(entry);
>this.insertEntryBefore : Symbol(List.insertEntryBefore, Decl(genericClassWithStaticFactory.ts, 91, 9))
>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>insertEntryBefore : Symbol(List.insertEntryBefore, Decl(genericClassWithStaticFactory.ts, 91, 9))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 103, 15))
}
}
export class ListFactory<T> {
>ListFactory : Symbol(ListFactory, Decl(genericClassWithStaticFactory.ts, 106, 5))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 108, 29))
public MakeHead<T>(): List<T> {
>MakeHead : Symbol(ListFactory.MakeHead, Decl(genericClassWithStaticFactory.ts, 108, 33))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 110, 24))
>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 110, 24))
var entry: List<T> = new List<T>(true, null);
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 111, 15))
>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 110, 24))
>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 110, 24))
entry.prev = entry;
>entry.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 111, 15))
>prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 111, 15))
entry.next = entry;
>entry.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 111, 15))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 111, 15))
return entry;
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 111, 15))
}
public MakeEntry<T>(data: T): List<T> {
>MakeEntry : Symbol(ListFactory.MakeEntry, Decl(genericClassWithStaticFactory.ts, 115, 9))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 117, 25))
>data : Symbol(data, Decl(genericClassWithStaticFactory.ts, 117, 28))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 117, 25))
>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 117, 25))
var entry: List<T> = new List<T>(false, data);
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 118, 15))
>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 117, 25))
>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 117, 25))
>data : Symbol(data, Decl(genericClassWithStaticFactory.ts, 117, 28))
entry.prev = entry;
>entry.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 118, 15))
>prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 118, 15))
entry.next = entry;
>entry.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 118, 15))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 118, 15))
return entry;
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 118, 15))
}
public RemoveEntry<T>(entry: List<T>): List<T> {
>RemoveEntry : Symbol(ListFactory.RemoveEntry, Decl(genericClassWithStaticFactory.ts, 122, 9))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 124, 27))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 124, 30))
>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 124, 27))
>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15))
>T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 124, 27))
if (entry == null) {
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 124, 30))
return null;
}
else if (entry.isHead) {
>entry.isHead : Symbol(List.isHead, Decl(genericClassWithStaticFactory.ts, 7, 20))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 124, 30))
>isHead : Symbol(List.isHead, Decl(genericClassWithStaticFactory.ts, 7, 20))
// Can't remove the head of a list!
return null;
}
else {
entry.next.prev = entry.prev;
>entry.next.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>entry.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 124, 30))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>entry.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 124, 30))
>prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
entry.prev.next = entry.next;
>entry.prev.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>entry.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 124, 30))
>prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>entry.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 124, 30))
>next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26))
return entry;
>entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 124, 30))
}
}
}
}
|