diff options
author | 2023-01-12 15:08:32 -0800 | |
---|---|---|
committer | 2023-01-12 15:08:32 -0800 | |
commit | 126809f20c418454651f23959a2e8e070ce216a1 (patch) | |
tree | 4cd7b221c16a988a25cfea9312ba5b92be8a76e0 | |
parent | fbe3f5dfb33534f6a95e43e2e13da9a9645831da (diff) | |
download | bun-126809f20c418454651f23959a2e8e070ce216a1.tar.gz bun-126809f20c418454651f23959a2e8e070ce216a1.tar.zst bun-126809f20c418454651f23959a2e8e070ce216a1.zip |
Add missing type
-rw-r--r-- | packages/bun-types/bun.d.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/bun-types/bun.d.ts b/packages/bun-types/bun.d.ts index 1df382a0a..41deb9410 100644 --- a/packages/bun-types/bun.d.ts +++ b/packages/bun-types/bun.d.ts @@ -1374,6 +1374,21 @@ declare module "bun" { * @see {@link ServerWebSocket.publish} */ closeOnBackpressureLimit?: boolean; + + /** + * Control whether or not ws.publish() should include the ServerWebSocket + * that published the message. This is enabled by default, but it was an API + * design mistake. A future version of Bun will change this default to + * `false` and eventually remove this option entirely. The better way to publish to all is to use {@link Server.publish}. + * + * if `true` or `undefined`, {@link ServerWebSocket.publish} will publish to all subscribers, including the websocket publishing the message. + * + * if `false`, {@link ServerWebSocket.publish} will publish to all subscribers excluding the websocket publishing the message. + * + * @default true + * + */ + publishToSelf?: boolean; } interface GenericServeOptions { |