mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
docs: fix client.event.subscribe example
This commit is contained in:
parent
0fbd7c84fd
commit
d2d7220933
1 changed files with 2 additions and 2 deletions
|
|
@ -307,8 +307,8 @@ await client.auth.set({
|
|||
|
||||
```javascript
|
||||
// Listen to real-time events
|
||||
const eventStream = await client.event.subscribe()
|
||||
for await (const event of eventStream) {
|
||||
const events = await client.event.subscribe()
|
||||
for await (const event of events.stream) {
|
||||
console.log("Event:", event.type, event.properties)
|
||||
}
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue