I am currently working on a TypeScript function similar to the following:
import multipleActionObject from page;
it("should be able to perform multiple operations", () => {
multipleActionObject.chooseIndex(4).setValue(10);
}
Instead of writing it like this:
import multipleActionObject from page;
it("should be able to do multiple operations", () => {
multipleActionObject.chooseAndSetNumber(4,10);
}
Within my multipleActionObject
class:
class multipleActionObject(){
public chooseAndSetNumber(index,value){
this.index[index].setValue(value)
}
}
Is there a way I can create a helper function for the first approach?