Javascript Intl.NumberFormat output problem

The function below produces output as “d59”.
The parameters this function takes are “de-De”, “eur” and 59

export function formatCurrency(loc: string, curr: string, price: number): string {
      let currUp = curr.toUpperCase(); //output: EUR
      return new Intl.NumberFormat(loc, { style: 'currency', currency: currUp }).format(price);
}

Output “d59”

What’s wrong here?