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

Add Scheduler class #4

Merged
merged 4 commits into from
Jun 1, 2024
Merged

Add Scheduler class #4

merged 4 commits into from
Jun 1, 2024

Conversation

krispya
Copy link
Member

@krispya krispya commented May 30, 2024

This creates a Scheduler class as a web-friendly API, wrapping the functional API. It currently isn't exported.

A couple of notes:

  • The schedule returned by the class is fully compatible with the functional API.
  • I did not include getTag, hasTag, getRunnable, etc, as methods since you have access to the maps on the schedule directly. We can add them if it makes sense.
  • Chaining is supported.
  • add uses an options object that gets converted to an array of options functions internally.

To discuss:

  • How to export? It can just be its own export so treeshaking is supported.

@krispya
Copy link
Member Author

krispya commented May 30, 2024

I removed auto-tag creation from this PR in favor of isolating it to this one: #5

@akdjr akdjr merged commit 794b5b0 into main Jun 1, 2024
@akdjr akdjr deleted the feat/scheduler-class branch June 1, 2024 06:55
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.

2 participants