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

createVars #11

Open
jantimon opened this issue Jul 15, 2022 · 0 comments
Open

createVars #11

jantimon opened this issue Jul 15, 2022 · 0 comments

Comments

@jantimon
Copy link
Owner

declaring multiple vars at once is quite repetitive right now e.g.:

const a = createVar()
const b = createVar()
const c = createVar()

maybe we could create a new helper createVars which would allow to use the spread operator to declare multiple vars at the same time:

export function* createVars<TValue = string> () { while(1) { yield createVar<TValue>() }}
const [a,b,c] = createVars();
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