Skip to content

Commit

Permalink
docs: correct documentation for ServerSentEvent (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonRask authored Jul 27, 2024
1 parent 82998d3 commit d34523a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions server_sent_event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ const DEFAULT_KEEP_ALIVE_INTERVAL = 30_000;

/** Options which can be set when initializing a {@linkcode ServerSentEvent}. */
export interface ServerSentEventInit extends EventInit {
/** Optional arbitrary data to send to the client, data this is a string will
* be sent unmodified, otherwise `JSON.parse()` will be used to serialize the
* value. */
/**
* Optional arbitrary data to send to the client, data this is a string will
* be sent unmodified, otherwise `JSON.stringify()` will be used to serialize
* the value.
*/
data?: unknown;

/** An optional `id` which will be sent with the event and exposed in the
Expand Down

0 comments on commit d34523a

Please sign in to comment.