asyncfunctiongetUserData(id:number):Promise<Result<UserData>>{if(id<=0){return{error:newError("Wrong, id can't be less or equal to zero!!!");}}return{result:{name:"Jimmy",age:22},}}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Sure, I actually like the golang pattern because is easy to read.
Also I got a different approach by asking about this.