-
Notifications
You must be signed in to change notification settings - Fork 678
/
class.ts
97 lines (81 loc) · 1.76 KB
/
class.ts
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
/**
* TestClass comment short text.
*
* TestClass comment text.
*
* @see [[TestClass]] @ fixtures
*/
export class TestClass {
/**
* publicProperty short text.
*/
public publicProperty: string;
/**
* privateProperty short text.
*/
private privateProperty: number[];
/**
* privateProperty short text.
*/
static staticProperty: TestClass;
/**
* Constructor short text.
*/
constructor() { }
/**
* publicMethod short text.
*/
public publicMethod() {}
/**
* protectedMethod short text.
*/
protected protectedMethod() {}
/**
* privateMethod short text.
*/
private privateMethod() {}
/**
* staticMethod short text.
*/
static staticMethod() {}
}
export class TestSubClass extends TestClass {
/**
* publicMethod short text.
*/
public publicMethod() {}
/**
* protectedMethod short text.
*/
protected protectedMethod() {}
/**
* Constructor short text.
*
* @param p1 Constructor param
* @param p2 Private string property
* @param p3 Public number property
* @param p4 Public implicit any property
*/
constructor(p1, private p2: string, public p3: number, public p4) {
super();
}
}
export abstract class TestAbstractClass {
abstract myAbstractProperty: string;
protected abstract myAbstractMethod(): void;
}
export class TestAbstractClassImplementation extends TestAbstractClass {
myAbstractProperty: string;
protected myAbstractMethod(): void { }
}
/**
* This class will not appear when `excludeNotExported=true`
*/
abstract class NotExportedClass {
/**
* Adds two numbers
*/
add(a: number, b: number) {
a + b;
}
}