| 1 | import { useCommittedCommand } from "./useCommittedCommand"; |
| 2 | |
| 3 | /** Stable event authority retaining only the latest committed presentation. */ |
| 4 | export function useTranscriptCommand<Args extends unknown[], Result>(command: (...args: Args) => Result) { |
| 5 | // Transcript callbacks are invoked only while their surface is mounted, so |
| 6 | // retain the existing exact result type at this compatibility boundary. |
| 7 | return useCommittedCommand(command) as (...args: Args) => Result; |
| 8 | } |
| 9 |