Skip to content

Commit 083392f

Browse files
Added example with TypeScript 1.3 features
1 parent fd6bac7 commit 083392f

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/**
2+
* A class with protected members.
3+
*/
4+
class ClassWithProtectedMembers
5+
{
6+
/**
7+
* A public property.
8+
*/
9+
public publicProperty:string;
10+
11+
/**
12+
* A protected property.
13+
*/
14+
protected protectedProperty:string;
15+
16+
/**
17+
* A private property.
18+
*/
19+
private privateProperty:[boolean,string,string];
20+
21+
/**
22+
* A public property.
23+
*/
24+
public publicMethod() {}
25+
26+
/**
27+
* A protected property.
28+
*/
29+
protected protectedMethod() {}
30+
31+
/**
32+
* A private property.
33+
*/
34+
private privateMethod() {}
35+
}
36+
37+
38+
/**
39+
* A subclass with inherited protected members.
40+
*/
41+
class SubclassWithProtectedMembers extends ClassWithProtectedMembers {
42+
43+
}
44+
45+
46+
/**
47+
* A variable with a tuple type.
48+
*/
49+
var tupleType:[string,ClassWithProtectedMembers] = ['test', new ClassWithProtectedMembers()];

0 commit comments

Comments
 (0)