|
1 | 1 | /// <reference path="fourslash.ts" />
|
2 | 2 |
|
3 | 3 | //// class FileSystemObject {
|
4 |
| -//// get is/*1*/File(): this is Item { |
5 |
| -//// return this instanceof Item; |
6 |
| -//// } |
7 |
| -//// set is/*2*/File(param) { |
8 |
| -//// // noop |
9 |
| -//// } |
10 |
| -//// get is/*3*/Directory(): this is Directory { |
11 |
| -//// return this instanceof Directory; |
12 |
| -//// } |
13 |
| -//// is/*4*/Networked: this is (Networked & this); |
14 |
| -//// constructor(public path: string) {} |
| 4 | +//// get is/*1*/File(): this is Item { |
| 5 | +//// return this instanceof Item; |
| 6 | +//// } |
| 7 | +//// set is/*2*/File(param) { |
| 8 | +//// // noop |
| 9 | +//// } |
| 10 | +//// get is/*3*/Directory(): this is Directory { |
| 11 | +//// return this instanceof Directory; |
| 12 | +//// } |
| 13 | +//// is/*4*/Networked: this is (Networked & this); |
| 14 | +//// constructor(public path: string) {} |
15 | 15 | //// }
|
16 | 16 | ////
|
17 | 17 | //// class Item extends FileSystemObject {
|
18 |
| -//// constructor(path: string, public content: string) { super(path); } |
| 18 | +//// constructor(path: string, public content: string) { super(path); } |
19 | 19 | //// }
|
20 | 20 | //// class Directory extends FileSystemObject {
|
21 |
| -//// children: FileSystemObject[]; |
| 21 | +//// children: FileSystemObject[]; |
22 | 22 | //// }
|
23 | 23 | //// interface Networked {
|
24 |
| -//// host: string; |
| 24 | +//// host: string; |
25 | 25 | //// }
|
26 | 26 | ////
|
27 | 27 | //// interface Sundries {
|
28 |
| -//// broken: boolean; |
| 28 | +//// broken: boolean; |
29 | 29 | //// }
|
30 | 30 | ////
|
31 | 31 | //// interface Supplies {
|
32 |
| -//// spoiled: boolean; |
| 32 | +//// spoiled: boolean; |
33 | 33 | //// }
|
34 | 34 | ////
|
35 | 35 | //// interface Crate<T> {
|
36 |
| -//// contents: T; |
37 |
| -//// is/*5*/Sundries: this is Crate<Sundries>; |
38 |
| -//// is/*6*/Supplies: this is Crate<Supplies>; |
39 |
| -//// is/*7*/PackedTight: this is (this & {extraContents: T}); |
| 36 | +//// contents: T; |
| 37 | +//// is/*5*/Sundries: this is Crate<Sundries>; |
| 38 | +//// is/*6*/Supplies: this is Crate<Supplies>; |
| 39 | +//// is/*7*/PackedTight: this is (this & {extraContents: T}); |
40 | 40 | //// }
|
41 | 41 | ////
|
42 | 42 | //// const obj: FileSystemObject = new Item("/foo", "");
|
43 | 43 | //// if (obj.is/*8*/File) {
|
44 |
| -//// obj./*9*/; |
45 |
| -//// if (obj.is/*10*/Networked) { |
46 |
| -//// obj./*11*/; |
47 |
| -//// } |
| 44 | +//// obj./*9*/; |
| 45 | +//// if (obj.is/*10*/Networked) { |
| 46 | +//// obj./*11*/; |
| 47 | +//// } |
48 | 48 | //// }
|
49 | 49 | //// if (obj.is/*12*/Directory) {
|
50 |
| -//// obj./*13*/; |
51 |
| -//// if (obj.is/*14*/Networked) { |
52 |
| -//// obj./*15*/; |
53 |
| -//// } |
| 50 | +//// obj./*13*/; |
| 51 | +//// if (obj.is/*14*/Networked) { |
| 52 | +//// obj./*15*/; |
| 53 | +//// } |
54 | 54 | //// }
|
55 | 55 | //// if (obj.is/*16*/Networked) {
|
56 |
| -//// obj./*17*/; |
| 56 | +//// obj./*17*/; |
57 | 57 | //// }
|
58 | 58 | ////
|
59 | 59 | //// const crate: Crate<any>;
|
60 | 60 | //// if (crate.is/*18*/PackedTight) {
|
61 |
| -//// crate./*19*/; |
| 61 | +//// crate./*19*/; |
62 | 62 | //// }
|
63 | 63 | //// if (crate.is/*20*/Sundries) {
|
64 |
| -//// crate.contents./*21*/; |
65 |
| -//// if (crate.is/*22*/PackedTight) { |
66 |
| -//// crate./*23*/ |
67 |
| -//// } |
| 64 | +//// crate.contents./*21*/; |
| 65 | +//// if (crate.is/*22*/PackedTight) { |
| 66 | +//// crate./*23*/ |
| 67 | +//// } |
68 | 68 | //// }
|
69 | 69 | //// if (crate.is/*24*/Supplies) {
|
70 |
| -//// crate.contents./*25*/; |
71 |
| -//// if (crate.is/*26*/PackedTight) { |
72 |
| -//// crate./*27*/ |
73 |
| -//// } |
| 70 | +//// crate.contents./*25*/; |
| 71 | +//// if (crate.is/*26*/PackedTight) { |
| 72 | +//// crate./*27*/ |
| 73 | +//// } |
74 | 74 | //// }
|
75 | 75 |
|
76 | 76 | goTo.marker("9");
|
|
0 commit comments