We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 304d7c6 commit 36d5e9aCopy full SHA for 36d5e9a
1 file changed
types/streams.d.ts
@@ -73,6 +73,12 @@ declare global {
73
/** The amount of data the consumer wants, or null if the stream is closed. */
74
readonly desiredSize: number | null;
75
76
+ /**
77
+ * An AbortSignal that is aborted when the stream consumer cancels/disconnects.
78
+ * Use this to detect client disconnection and stop producing data.
79
+ */
80
+ readonly signal?: AbortSignal;
81
+
82
/** Closes the stream. No more chunks can be enqueued after this. */
83
close(): void;
84
0 commit comments