When using nodejs and typescript, and adding a day to the date, typescript gives compilation error stating
Overload 1 of 3, '(amount: string | number, unit: IUnitOfTime): Moment', gave the following error.
Argument of type '"iDate"' is not assignable to parameter of type 'IUnitOfTime'.
Overload 2 of 3, '(amount?: DurationInputArg1, unit?: DurationConstructor | undefined): Moment', gave the following error.
Argument of type '"iDate"' is not assignable to parameter of type 'DurationConstructor | undefined'.
Overload 3 of 3, '(unit: DurationConstructor, amount: string | number): Moment', gave the following error.
Argument of type '2' is not assignable to parameter of type 'DurationConstructor'.
When using nodejs and typescript, and adding a day to the date, typescript gives compilation error stating
Overload 1 of 3, '(amount: string | number, unit: IUnitOfTime): Moment', gave the following error. Argument of type '"iDate"' is not assignable to parameter of type 'IUnitOfTime'. Overload 2 of 3, '(amount?: DurationInputArg1, unit?: DurationConstructor | undefined): Moment', gave the following error.
Argument of type '"iDate"' is not assignable to parameter of type 'DurationConstructor | undefined'. Overload 3 of 3, '(unit: DurationConstructor, amount: string | number): Moment', gave the following error. Argument of type '2' is not assignable to parameter of type 'DurationConstructor'.