import { Decorator } from '../support_decorators/decorator.js'; import type ComponentContext from '../../component_context.js'; /** * PHP parity: Livewire\Attributes\Isolate * * By default, when several components on the same page update at once * (e.g. two `wire:poll`s firing in the same tick), the client bundles * their pending updates into a single HTTP request — see * `coordinateNetworkInteractions()` in the vendored client bundle * (assets/livewire.js), which already reads `component.isIsolated` * (backed by `snapshot.memo.isolate`) to decide whether to partition a * component's message out into its own solo request instead. * * This decorator's only job is to set that memo flag on every dehydrate * — unlike Async/Defer/etc. (set once, at a specific lifecycle moment), * isolation applies to every request the component makes for its whole * lifetime, so the flag has to be present in every outgoing snapshot. */ export default class Isolate extends Decorator { dehydrate(context: ComponentContext): Promise; }