mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
stream_edit: Convert module to typescript.
This commit is contained in:
@@ -5,16 +5,15 @@ import * as settings_ui from "./settings_ui";
|
||||
import type {StreamProperties, StreamSubscription} from "./sub_store";
|
||||
import * as sub_store from "./sub_store";
|
||||
|
||||
export function bulk_set_stream_property(
|
||||
sub_data: {
|
||||
[Property in keyof StreamProperties]: {
|
||||
stream_id: number;
|
||||
property: Property;
|
||||
value: StreamProperties[Property];
|
||||
};
|
||||
}[keyof StreamProperties][],
|
||||
$status_element?: JQuery,
|
||||
): void {
|
||||
export type SubData = {
|
||||
[Property in keyof StreamProperties]: {
|
||||
stream_id: number;
|
||||
property: Property;
|
||||
value: StreamProperties[Property];
|
||||
};
|
||||
}[keyof StreamProperties][];
|
||||
|
||||
export function bulk_set_stream_property(sub_data: SubData, $status_element?: JQuery): void {
|
||||
const url = "/json/users/me/subscriptions/properties";
|
||||
const data = {subscription_data: JSON.stringify(sub_data)};
|
||||
if (!$status_element) {
|
||||
|
||||
Reference in New Issue
Block a user