Skip to content

Commit e2c1140

Browse files
committed
Fix some incorrect promise stuff for streaming methods
They return ReadableStreams, never promises.```
1 parent 5dc246b commit e2c1140

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ All three of the APIs support streaming output, via counterpart methods `summari
119119
```js
120120
const writer = await Writer.create({ tone: "formal", length: "long" });
121121

122-
const stream = await writer.writeStreaming(
122+
const stream = writer.writeStreaming(
123123
"A draft for an inquiry to my bank about how to enable wire transfers on my account"
124124
);
125125

index.bs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2106,7 +2106,7 @@ Every [=interface=] [=interface/including=] the {{DestroyableModel}} interface m
21062106

21072107
1. Let |compositeSignal| be the result of [=creating a dependent abort signal=] given |signals| using {{AbortSignal}} and |modelObject|'s [=relevant realm=].
21082108

2109-
1. If |compositeSignal| is [=AbortSignal/aborted=], then return [=a promise rejected with=] |compositeSignal|'s [=AbortSignal/abort reason=].
2109+
1. If |compositeSignal| is [=AbortSignal/aborted=], then throw |compositeSignal|'s [=AbortSignal/abort reason=].
21102110

21112111
1. Let |stream| be a [=new=] {{ReadableStream}} created in |modelObject|'s [=relevant realm=].
21122112

0 commit comments

Comments
 (0)