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

.get should have options as the last argument #6

Open
msluther opened this issue Feb 11, 2019 · 0 comments
Open

.get should have options as the last argument #6

msluther opened this issue Feb 11, 2019 · 0 comments

Comments

@msluther
Copy link
Contributor

On the next breaking change, we should swap the order to make the optional options object be easier to work with.

Now:

myCache.get('foo', {}, myGetterFn);

Should become:

myCache.get('foo', myGetterFn, {});

that allows for making it more optional and dropping it altogether without having to typecheck anything:

this:

myCache.get('foo', void 0, myGetterFn);

becomes this:

myCache.get('foo', myGetterFn);
@msluther msluther mentioned this issue Feb 11, 2019
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