import type * as Chunk from "../../Chunk.js" import type * as Fiber from "../../Fiber.js" import type * as HandoffSignal from "./handoffSignal.js" /** @internal */ export type DebounceState = NotStarted | Previous | Current /** @internal */ export const OP_NOT_STARTED = "NotStarted" as const /** @internal */ export type OP_NOT_STARTED = typeof OP_NOT_STARTED /** @internal */ export const OP_PREVIOUS = "Previous" as const /** @internal */ export type OP_PREVIOUS = typeof OP_PREVIOUS /** @internal */ export const OP_CURRENT = "Current" as const /** @internal */ export type OP_CURRENT = typeof OP_CURRENT export interface NotStarted { readonly _tag: OP_NOT_STARTED } /** @internal */ export interface Previous { readonly _tag: OP_PREVIOUS readonly fiber: Fiber.Fiber> } /** @internal */ export interface Current { readonly _tag: OP_CURRENT readonly fiber: Fiber.Fiber, E> } /** @internal */ export const notStarted: DebounceState = { _tag: OP_NOT_STARTED } /** @internal */ export const previous = (fiber: Fiber.Fiber>): DebounceState => ({ _tag: OP_PREVIOUS, fiber }) /** @internal */ export const current = (fiber: Fiber.Fiber, E>): DebounceState => ({ _tag: OP_CURRENT, fiber })