* Synchronously read the persisted messages for constructor-time hydration. * Returns the raw `getItem` result (which may be a promise for async stores).
()
| 74 | * Returns the raw `getItem` result (which may be a promise for async stores). |
| 75 | */ |
| 76 | readInitial(): |
| 77 | | Array<UIMessage> |
| 78 | | null |
| 79 | | undefined |
| 80 | | Promise<Array<UIMessage> | null | undefined> { |
| 81 | try { |
| 82 | return this.adapter.getItem(this.id) |
| 83 | } catch { |
| 84 | return undefined |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | /** |
| 89 | * Apply messages from an async `getItem` once it resolves, unless the message |
no outgoing calls
no test coverage detected