Skip to content

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

@Dobermensch

Description

@Dobermensch

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions