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

Context API Collection #18

Open
4 tasks
KeKs0r opened this issue Oct 9, 2022 · 0 comments
Open
4 tasks

Context API Collection #18

KeKs0r opened this issue Oct 9, 2022 · 0 comments

Comments

@KeKs0r
Copy link
Owner

KeKs0r commented Oct 9, 2022

  • expose Parent via context
  • Improve context API to not not sound weird (e.g. the variable is called context, and then we have a getContext function on that? Maybe rename the current TaskContext to Scope or something else.
  • Consider using Symbols for type inference
  • ❓ should it be possible to set context in the same FN where it is accessed?
function myTask(input, {getContext, setContext}) {
  const before = getContext('foo')
  setContext('foo', 'bar')
  const after = getContext('foo')
}
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

No branches or pull requests

1 participant