How to fix Required parameter cannot follow optional parameter in TypeScript | DevErrors