How to fix Template literal substitution type must be literal or union in TypeScript | DevErrors