I'm trying to update dates in my angular 6 application using Intl.DateTimeFormat and passing locale and dateStyle, timeStyle options. I'm able to get the custom date while trying in browser console however as soon as I try to integrate the same in my app, it throws compilation error: Type '{ dateStyle: string; timeStyle: string; }' has no properties in common with type 'DateTimeFormatOptions'.
transformDate() {
const options = { dateStyle: "full", timeStyle: "medium" };
console.log(new Intl.DateTimeFormat('en-US',options).format(this.date));
}