0👍
Change the name of your interface, it’s duplicate with default type Date of javascript
export interface Date { // something else, maybe myDate
toDate: (locale: string) => string;
toTime: (locale: string) => string;
toDateTime: (locale: string, useText?: boolean) => string;
}
Source:stackexchange.com