utils/node_modules/computeds/out/effect.js

15 lines
373 B
JavaScript
Raw Normal View History

2024-02-07 01:33:07 -05:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.effect = void 0;
const tracker_1 = require("./tracker");
function effect(fn) {
const tracker = new tracker_1.Tracker(() => { }, () => {
if (tracker.dirty) {
tracker.track(fn);
}
});
tracker.track(fn);
return tracker;
}
exports.effect = effect;