How to make a promise object immutable when setting different states in Javascript

join shbcf.ru