WalkMe interview question

Fix code bugs with typscript