As a newcomer to TypeScript (coming from the Java world), I am experimenting with creating a mapper function like this:
public getApercuTypePrestationFromTypePrestationEX044(typePrestationEX044: TypePrestationEX044): ApercuTypePrestation {
let apercuTypePrestation: ApercuTypePrestation;
if (null != typePrestationEX044) {
apercuTypePrestation = new ApercuTypePrestation();
apercuTypePrestation.codeTypePrestation == typePrestationEX044.code;
apercuTypePrestation.libelleTypePrestation == typePrestationEX044.libelle;
}
console.log("A = " + typePrestationEX044.code);
console.log("B = " + apercuTypePrestation.libelleTypePrestation);
return apercuTypePrestation;
}
Unfortunately, it's not working as intended. The console output shows: A = A8C B = undefined
Can anyone help me figure out how to fix this issue?