Do you think there is a more efficient way to write this code?
The function Z can be called with either one parameter or with no parameters. If the parameter Y is passed in, then the function z(y) is returned, otherwise just run the function z()
async x (y?: string) {
if(y) {
return z(y)
} else {
return z()
}
}