eduolalo / moment-business-days

This is a momentJS plugin that allows you to use only business days (Monday to Friday)
MIT License
240 stars 67 forks source link

Typescript error #83

Open spearmootz opened 4 years ago

spearmootz commented 4 years ago

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 commented 4 years ago

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