UNPKG

devextreme

Version:

HTML5 JavaScript Component Suite for Responsive Web Development

32 lines (31 loc) 897 B
/** * DevExtreme (cjs/__internal/core/r1/runtime/inferno/effect_host.js) * Version: 25.1.3 * Build date: Wed Jun 25 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.InfernoEffectHost = void 0; const InfernoEffectHost = exports.InfernoEffectHost = { lockCount: 0, lock() { this.lockCount++ }, callbacks: [], callEffects() { this.lockCount--; if (this.lockCount < 0) { throw new Error("Unexpected Effect Call") } if (0 === this.lockCount) { const effects = this.callbacks; this.callbacks = []; effects.forEach((callback => callback())) } } };