Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript error #83

Open
spearmootz opened this issue Feb 21, 2020 · 1 comment
Open

Typescript error #83

spearmootz opened this issue Feb 21, 2020 · 1 comment

Comments

@spearmootz
Copy link

Typescript 3.7.3

This expression is not callable.
Type 'typeof import("/Users/speared/dev/smartScan/node_modules/moment/moment.d.ts")' has no call signatures.ts(2349)
index.d.ts(1, 1): Type originates at this import. A namespace-style import

@etienneret
Copy link

etienneret commented Mar 12, 2020

Typescript Version 3.8.2
Same issue here,

node_modules/moment-business-days/index.d.ts:1:1
1 import * as moment from 'moment';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.

Change in index.d.ts
import * as moment from 'moment'; --> import moment from 'moment';

And it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants