import {
  sanitizeStructuredCloneValue,
  type StructuredCloneSanitized,
} from '#cli/compat/runtime-host'

export function sanitizeForWorkerPostMessage<T>(
  value: T,
): StructuredCloneSanitized {
  return sanitizeStructuredCloneValue(value)
}
