-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomponent.ts
73 lines (64 loc) · 1.36 KB
/
component.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
import { TestClassDecorator, TestFunctionDecorator } from "./decorators";
@TestClassDecorator()
export class Component {
/**
* Does some stuff.
* @param start
* @param end
*/
@TestFunctionDecorator("/test")
public executeSomeLogic(start: number, end: number) {
let log = "Started";
this.log(log);
if (start >= end) {
return 0;
}
// Just loop from start to end. Test Comment.
while (start < end) {
this.log(start.toString());
start++;
}
const multiplied = this.multiply(start, end);
if (multiplied > 25) {
(<any>console.error).blah();
}
this.log(multiplied.toString());
log = "Ended";
console.log(log);
return multiplied;
}
/**
* Generic Logging
* @param text
*/
private log(text: string) {
console.log(text);
}
/**
* Useless comment
* @param value1
* @param value2
*/
private multiply(value1: number, value2: number) {
const result = value1 * value2;
console.log("Multiplied: " + result);
return result;
}
/**
* Who put this in here?
* @param param1
* @param param2
*/
public unusedFunction(param1: number, param2: string) {
let result;
if (param1 === 5) {
result = param1 * 2;
} else {
result = param1 * 10;
}
if (param2) {
console.log(param2, param1);
}
return result;
}
}