Added functionallity to handle functions
This commit is contained in:
@@ -6,7 +6,7 @@ public lib Preview.Classes {
|
||||
this._name = name;
|
||||
}
|
||||
|
||||
public getName(): string {
|
||||
public func getName(): string {
|
||||
return this._name;
|
||||
}
|
||||
}
|
||||
|
@@ -2,4 +2,8 @@ public lib Preview.Functions {
|
||||
public func isTrue(value: bool): bool {
|
||||
return value;
|
||||
}
|
||||
|
||||
public func add(value1: number, value2: number): number {
|
||||
return value1 + value2;
|
||||
}
|
||||
}
|
@@ -10,13 +10,13 @@ public lib Main {
|
||||
this.test = Test(str);
|
||||
}
|
||||
|
||||
public func Main(): void {
|
||||
public func Main(): empty {
|
||||
output(str, test, test2, test3);
|
||||
output(isTrue(test));
|
||||
output(this.test.getName());
|
||||
}
|
||||
|
||||
private func testForEach(): void {
|
||||
private func testForEach(): empty {
|
||||
var loopList = [];
|
||||
loopList.forEach(e => {
|
||||
output(e);
|
||||
|
Reference in New Issue
Block a user