[Vuejs]-How to extends basic type with typescript

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;
}

Leave a comment