Typescript / Angular constructor errors #53
Description
Describe the bug
Import error/confusion.
Litepicker 1.0.34
Typescript 3.8
Angular 9
To Reproduce
If you import like this: import { Litepicker } from 'litepicker';
in typescript (angular)
and use it as const picker = new Litepicker(..)
. I get:
ERROR in ..../src/app/main-nav/service-overview/service-overview.component.ts:41:24 - error TS2351: This expression is not constructable. Type 'typeof import("...../node_modules/litepicker/dist/js/index")' has no construct signatures.
If I import it as import * as Litepicker from 'litepicker';
Then compiler errors with: TS2351: This expression is not constructable. Type 'typeof import("/..../node_modules/litepicker/dist/js/index")' has no construct signatures.
(I also tried import Litepicker from 'litepicker';
which is not valid)
I think you have the types mixed up or something.
edit
I think you need a contructor defined in methods.ts
Litepicker.prototype = [...]
something like that.
Expected behavior
To run without errors or warnings.