Skip to content

Commit

Permalink
api types [nfc]: Individually mark read-only the properties of Stream
Browse files Browse the repository at this point in the history
This makes it easy to, say, flip `name` from read-only to write-only
in order to audit the remaining uses of stream names.
  • Loading branch information
gnprice committed Feb 18, 2022
1 parent b731d93 commit f551158
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/api/modelTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,20 +304,20 @@ export type MutedUser = $ReadOnly<{|
//
//

export type Stream = $ReadOnly<{|
stream_id: number,
description: string,
name: string,
invite_only: boolean,
is_announcement_only: boolean,
export type Stream = {|
+stream_id: number,
+description: string,
+name: string,
+invite_only: boolean,
+is_announcement_only: boolean,
// TODO(server-2.1): is_web_public was added in Zulip version 2.1;
// absence implies the stream is not web-public.
is_web_public?: boolean,
history_public_to_subscribers: boolean,
|}>;
+is_web_public?: boolean,
+history_public_to_subscribers: boolean,
|};

export type Subscription = {|
...$ReadOnly<$Exact<Stream>>,
...Stream,
+color: string,
+in_home_view: boolean,
+pin_to_top: boolean,
Expand Down

0 comments on commit f551158

Please sign in to comment.