Skip to content

Commit 90c516c

Browse files
committed
Added sample code
1 parent b848002 commit 90c516c

File tree

1 file changed

+22
-17
lines changed
  • rocket-chatter-ingestion-server

1 file changed

+22
-17
lines changed
Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
1-
let b = 4
2-
let c = 5
1+
class Employee<T> extends Human {
2+
private _salary: number = 0
3+
private _name: T
34

4-
function getValue(a: number): number {
5-
return a
6-
}
5+
constructor(name: T, salary: number) {
6+
this._name = name
7+
this._salary = salary
8+
}
9+
10+
get salary(): number {
11+
return this._salary
12+
}
13+
14+
set salary(value: number) {
15+
if (value >= 0) {
16+
this._salary = value
17+
} else {
18+
throw new Error("Salary cannot be negative.")
19+
}
20+
}
721

8-
enum ComputedEnum {
9-
First = 1,
10-
Sixth = c,
11-
Seventh = new A<P>(),
12-
Second = getValue(b),
13-
Third = (() => {
14-
return 3
15-
})(),
16-
Fourth = (() => 4)(),
17-
Fifth = (function () {
18-
return 5
19-
})(),
22+
dumb<B>(a: T, b: B) {
23+
return a
24+
}
2025
}

0 commit comments

Comments
 (0)