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

Fix types so that all types are exported #210

Closed
wants to merge 5 commits into from

Conversation

BehindTheMath
Copy link

Wrapping in a namespace causes that only the types for those functions are exported.

Wrapping in a namespace causes that only the types for those functions
are exported.
* Since `parseExpression` is just a wrapper for `CronExpression.parse`,
  just point to the type for `CronExpression.parse`.
* Export more interfaces.
* The return type for callbacks should be `void`, since the return value
  is ignored.
* The type for errors is `any`.
* Add a generic to flag whether methods will return a `CronDate` or an
  `IteratorResult`.
* Add the `nthDayOfWeek` property to the `ParserOptions` interface.
* Expand the valid types for the `resetDate` parameter of the `reset`
  method.
* Correct the `parse` method to be static.
* Add types for the constructor, since it's not marked as private.
  (Technically, `tz` can also be a Luxon `Zone`, but I didn't want to
   add a dependency on `@types/luzon`).
* Add the `isLastDayOfMonth` method.
@harrisiirak
Copy link
Owner

@BehindTheMath closing this favour of #214. Let me know there is something missing or can be improved further.

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 this pull request may close these issues.

None yet

2 participants