Typescript TS7053

It is quick memo to fix TS7053 error, it took a while to fix it on other day. Here is a example code.

interface PointCondition {
        pleasurePoint: number;
        steamerLane: number;
};

const state: PointCondition = { 
        pleasurePoint: 88, 
        steamerLane: 92, 
};

function getCondition(key: string) : number {
        return state[key];
};

Object.keys(state).forEach(function(key){
  return console.log( getCondition(key) );
})

Continue reading →