mirror of https://github.com/ANL-CEEESA/RELOG.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
592 B
22 lines
592 B
System.register(['immer'], (function (exports) {
|
|
'use strict';
|
|
var produce;
|
|
return {
|
|
setters: [function (module) {
|
|
produce = module.produce;
|
|
}],
|
|
execute: (function () {
|
|
|
|
const immerImpl = (initializer) => (set, get, store) => {
|
|
store.setState = (updater, replace, ...a) => {
|
|
const nextState = typeof updater === "function" ? produce(updater) : updater;
|
|
return set(nextState, replace, ...a);
|
|
};
|
|
return initializer(store.setState, get, store);
|
|
};
|
|
const immer = exports("immer", immerImpl);
|
|
|
|
})
|
|
};
|
|
}));
|