Example with typed components

Hello

Is there an example on how to type tool call responses and re-using those types in React components?

Look at this example here: AI SDK UI: Chatbot Tool Usage

`case ‘tool-askForConfirmation’: {` ← how can I extract everything in here to a AskForConfirmation component with correct types?

Best