We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
schedule
Funny enough, I feel like this is the first way I did scheduling, but @trxcllnt is resurrecting it...
Instead of:
schedule(delay: number, state:any, work:(state?: any) => Subscription | void) : Subscription
it should be:
schedule(work:(state?: any) => Subscription | void, delay: number = 0, state?: any) : Subscription
This actually brings it sort of inline with methods like setTimeout to a degree.
setTimeout
The text was updated successfully, but these errors were encountered:
Any reason you have the state parameter?
Sorry, something went wrong.
@headinthebox it's to pass data/parameters to the work function, mostly.
work
someScheduler.schedule(dispatch, 100, { name: 'world' }); function dispatch(state) { console.log('hello ' + state.name); }
benlesh
Successfully merging a pull request may close this issue.
Funny enough, I feel like this is the first way I did scheduling, but @trxcllnt is resurrecting it...
Instead of:
it should be:
This actually brings it sort of inline with methods like
setTimeout
to a degree.The text was updated successfully, but these errors were encountered: