nativescript-datetimepicker icon indicating copy to clipboard operation
nativescript-datetimepicker copied to clipboard

"No Overload Matches this call" when doing Vue.use(DateTimePicker) in main.ts

Open Dobermensch opened this issue 5 years ago • 0 comments

I have a NS-Vue TS enabled project. I've installed the plugin using tns add plugin nativescript-datetimepicker. Now after installation, I go to the main.ts file to declare the plugin like so import DateTimePicker from "nativescript-datetimepicker/vue"; Vue.use(DateTimePicker); However I get swiggly red lines underneath 'DateTimePicker' in Vue.use(DateTimePicker).

I get the following error: Screen Shot 2020-08-08 at 2 15 36 PM

So I changed the file node_modules/nativescript-datetimepicker/vue/index.d.ts from export * from "./index"; to

// export * from "./index";

declare const DateTimePicker: {
  install(Vue: any, options: any): void;
};
export default DateTimePicker;

and now the swiggly red lines around Vue.use(DateTimePicker) are gone and I can build the project.

Dobermensch avatar Aug 08 '20 06:08 Dobermensch