Am un astfel de caz:
interface MoverShaker {
getStatus(): { speed: number; frequency: number; };
}
function GetMoverShaker() : MoverShaker {
return {
getStatus: () => { speed: 2, frequency: 3 }
}
}
Sunt obtinerea o astfel de eroare: Numele de „frecvență“ nu există în domeniul de aplicare curent. Este o astfel de construcție este posibil dactilografiat? Dacă eu sunt, folosind o astfel de construcție, atunci totul este în regulă:
function GetMoverShaker(): MoverShaker {
return {
getStatus: () => {
return { speed: 2, frequency: 3 }
}
}













