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

React to QeweEntry priority changes #7

Closed
jgmcelwain opened this issue Jan 15, 2022 · 1 comment
Closed

React to QeweEntry priority changes #7

jgmcelwain opened this issue Jan 15, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@jgmcelwain
Copy link
Owner

jgmcelwain commented Jan 15, 2022

Suggested behaviour:

const queue = new Qewe({ reactive: true });

const firstEntry = queue.enqueue('hello', 1);
const secondEntry = queue.enqueue('world', 2);

console.log(...queue); // [ 'world', 'hello' ]

firstEntry.priority = 3;

console.log(...queue); // [ 'hello', 'world ]

This should be possible by returning a Proxy from .enqueue that wraps the QeweEntry's priority setter.

@jgmcelwain jgmcelwain added the enhancement New feature or request label Jan 15, 2022
@jgmcelwain
Copy link
Owner Author

Working on this over in #8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant