return restResponse, nil
cannot use restResponse (variable of type RestResponse) as *RestResponse value in return statement
return &restResponse, nil
interface ISport {
id: number,
parentId: number,
name: string,
}
private createSportsMap (sports: [ISport]) {
for (let i = 0, len = sports.length; i < len; i++) {
this.sportsMap[sports[i]["id"]] = sports[i]
}
}
async function func(){
await (function foo(){
if(condition){
foo();
};
})();
// Код после отработки рекурсивной функции
};