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 missing isoWeeks for add/substract #5007

Closed
Klemensas opened this issue Feb 18, 2019 · 3 comments · Fixed by #5008
Closed

TypeScript missing isoWeeks for add/substract #5007

Klemensas opened this issue Feb 18, 2019 · 3 comments · Fixed by #5008

Comments

@Klemensas
Copy link
Contributor

Describe the bug
As a result of #4518 we can use isoWeek values in add/subtract. But TS typings weren't updated to allow for such usage.

Expected behavior
No error.

Screenshots
If applicable, add screenshots to help explain your problem.

Moment-specific environment
TypeScript

@Klemensas Klemensas changed the title Typescript missing isoWeeks for add/substract TypeScript missing isoWeeks for add/substract Feb 18, 2019
Klemensas added a commit to Klemensas/moment that referenced this issue Feb 18, 2019
@LoganDupont
Copy link

I have the same problem. @icambron, @marwahaha can someone of you confirm this is an issue?

@njifares
Copy link

Any updates on this?

jwarykowski added a commit to jwarykowski/moment that referenced this issue Sep 4, 2019
If you use `isoWeek` within the add or subtract functions you get the following type error reported: 

```
Argument of type 'number' is not assignable to parameter of type 'DurationConstructor'.
```

Adding _isoWeek as valid type for DurationConstructor to fix this problem. This was original raised within moment#5007.
@Klemensas
Copy link
Contributor Author

I've made a PR for this the same day I opened the issue. Looks like no one cares enough to review it 🤷‍♂

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

Successfully merging a pull request may close this issue.

3 participants