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

Fix using multiple decorators on the same instance #78

Merged
merged 3 commits into from Jul 17, 2021
Merged

Fix using multiple decorators on the same instance #78

merged 3 commits into from Jul 17, 2021

Conversation

bencehornak
Copy link
Contributor

Fixes #77

Without incrementing returnValue every time *inside* the function, it is
not possible to test, if it is actually cached.
index.ts Outdated Show resolved Hide resolved
@sindresorhus
Copy link
Owner

// @Richienb

index.ts Outdated Show resolved Hide resolved
test.ts Outdated Show resolved Hide resolved
Currently the library mixes different memoized functions if they belong
to the same instance
@sindresorhus sindresorhus changed the title Multiple decorators on one instance Fix using multiple decorators on the same instance Jul 17, 2021
@sindresorhus sindresorhus merged commit 7f7ca0a into sindresorhus:main Jul 17, 2021
@bencehornak bencehornak deleted the multiple-decorators-on-one-instance branch July 17, 2021 14:23
bencehornak added a commit to carmino-app/mem that referenced this pull request Aug 24, 2021
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

Successfully merging this pull request may close these issues.

Memoized methods of the same instance are mixed
4 participants