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

Возможность устанавливать токены и сбрасывать их до изначального состояния #130

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Nnigmat
Copy link
Contributor

@Nnigmat Nnigmat commented Sep 2, 2021

Есть необходимость устанавливать токены и сбрасывать их.

Это можно делать в приложении, но это слишком громоздко из-за эффектора, нужно пересоздавать observer и заново навешивать на него watcher'ы и удалять старые.

@Nnigmat Nnigmat changed the title feat: add reset function for observer Возможность устанавливать токены и сбрасывать их до изначального состояния Sep 2, 2021
private options: CompileOptions
private compile: Compile
private watchers: Set<Watcher> = new Set()

constructor(options: CompileOptions, _compile: Compile = compile) {
this.compile = _compile
this.options = options
this.options = deepcopy(options)
Copy link
Contributor Author

@Nnigmat Nnigmat Sep 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Здесь deepcopy, потому что у нас происходила мутация данных пользователя. Я столкнулся с этим во время запуска тестов, токены из одного теста были в другом.

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.

None yet

1 participant