How to fix Argument of type 'boolean' is not assignable to parameter of type 'string' in TypeScript | DevErrors