vuejs / composition-api

Composition API plugin for Vue 2
https://composition-api.vuejs.org/
MIT License
4.19k stars 343 forks source link

fix(types): add `Date` to `BaseTypes` #957

Closed digitorum closed 2 years ago

digitorum commented 2 years ago

Add Date to BaseTypes to prevent type resolve mismatch.


Argument of type 'string | { toString: () => string; toDateString: () => string; toTimeString: () => string; toLocaleString: { (): string; (locales?: string | string[] | undefined, options?: DateTimeFormatOptions | undefined): string; }; ... 38 more ...; toJSON: (key?: any) => string; }' is not assignable to parameter of type 'string | Date'.```
digitorum commented 2 years ago

@antfu what do you think about it?