import { Ref, WritableComputedRef } from "vue" export type Handle = { get: () => HandleRef } export type HandleRef = Ref< HandleState > export type HandleState = | { type: "ok"; data: T } | { type: "invalid"; reason: InvalidateReason } export type WritableHandleRef< T, InvalidateReason = unknown, > = WritableComputedRef>