How to fix Rest element must be last in tuple type in TypeScript | DevErrors