#40 - convert rest to typescript