Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

shared: Remove .flow files.

Shubham Padiaeaa577315042
diff --git a/web/shared/src/internal_url.js.flow b/web/shared/src/internal_url.js.flow
deleted file mode 100644
index 28567263155..00000000000
--- a/web/shared/src/internal_url.js.flow
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * @flow strict
- */
-
-"use strict";
-
-declare export function encodeHashComponent(str: string): string;
-
-declare export function decodeHashComponent(str: string): string;
-
-declare export function stream_id_to_slug(
- stream_id: number,
- maybe_get_stream_name: (id: number) => ?string,
-): string;
-
-declare export function encode_stream_id(
- stream_id: number,
- maybe_get_stream_name: (id: number) => ?string,
-): string;
-
-declare export function by_stream_url(
- stream_id: number,
- maybe_get_stream_name: (id: number) => ?string,
-): string;
-
-declare export function by_stream_topic_url(
- stream_id: number,
- topic: string,
- maybe_get_stream_name: (id: number) => ?string,
-): string;
-
-declare export function by_channel_topic_list_url(
- stream_id: number,
- maybe_get_stream_name: (id: number) => ?string,
-): string;
diff --git a/web/shared/src/poll_data.js.flow b/web/shared/src/poll_data.js.flow
deleted file mode 100644
index 18ab87e4ac3..00000000000
--- a/web/shared/src/poll_data.js.flow
+++ /dev/null
@@ -1,46 +0,0 @@
-// @flow strict
-
-/**
- * The data encoded in a submessage that acts on a poll widget.
- *
- * In reality these are more specific than this type. But they're currently
- * completely undocumented in the API:
- * https://chat.zulip.org/#narrow/channel/412-api-documentation/topic/.60.2Esubmessages.60.20on.20message.20objects/near/1358493
- * so we don't attempt to go any further here.
- */
-type PollEvent = {...};
-
-declare export class PollData {
- constructor({
- message_sender_id: number,
- current_user_id: number,
- is_my_poll: boolean,
- question: string,
- options: interface {entries(): Iterable<[number, string]>},
- comma_separated_names: (user_ids: number[]) => string,
- report_error_function: (msg: string) => void,
- }): void;
-
- set_question(question: string): void;
-
- get_question(): string;
-
- set_input_mode(): void;
-
- clear_input_mode(): void;
-
- get_input_mode(): boolean;
-
- get_widget_data(): {
- question: string,
- options: Array<{
- option: string,
- names: string,
- count: number,
- key: string,
- current_user_vote: boolean,
- }>,
- };
-
- handle_event(sender_id: number, data: PollEvent): void;
-}
diff --git a/web/shared/src/resolved_topic.js.flow b/web/shared/src/resolved_topic.js.flow
deleted file mode 100644
index 4c6a83c409d..00000000000
--- a/web/shared/src/resolved_topic.js.flow
+++ /dev/null
@@ -1,11 +0,0 @@
-// @flow strict
-
-declare export var RESOLVED_TOPIC_PREFIX: string;
-
-declare export function is_resolved(topic_name: string): boolean;
-
-declare export function resolve_name(topic_name: string): string;
-
-declare export function unresolve_name(topic_name: string): string;
-
-declare export function display_parts(topic_name: string): [string, string];
diff --git a/web/shared/src/typeahead.js.flow b/web/shared/src/typeahead.js.flow
deleted file mode 100644
index c83a57902d7..00000000000
--- a/web/shared/src/typeahead.js.flow
+++ /dev/null
@@ -1,31 +0,0 @@
-// @flow strict
-
-export type Emoji = {
- emoji_name: string,
- emoji_code: string,
- reaction_type: "unicode_emoji" | "realm_emoji" | "zulip_extra_emoji",
- ...
-};
-
-// declare export var popular_emojis
-
-declare export function remove_diacritics(s: string): string;
-
-declare export function query_matches_string(
- query: string,
- source_str: string,
- split_char: string,
-): boolean;
-
-// declare export function clean_query_lowercase
-
-declare export function get_emoji_matcher(
- query: string,
-): (emoji: Emoji) => boolean;
-
-// declare export function triage
-
-declare export function sort_emojis<E: {...Emoji, ...}>(
- emojis: $ReadOnlyArray<E>,
- query: string,
-): Array<E>;
diff --git a/web/shared/src/typing_status.js.flow b/web/shared/src/typing_status.js.flow
deleted file mode 100644
index df77841ef0b..00000000000
--- a/web/shared/src/typing_status.js.flow
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * @flow strict
- */
-
-"use strict";
-
-type DirectMessageObject<UserId: number> = {|
- message_type: string,
- ids: $ReadOnlyArray<UserId>,
-|};
-type StreamObject = {|
- message_type: string,
- stream_id: number,
- topic: string,
-|};
-
-type Worker<UserId> = {|
- get_current_time: () => number, // as ms since epoch
- notify_server_start: (DirectMessageObject<UserId> | StreamObject) => void,
- notify_server_stop: (DirectMessageObject<UserId> | StreamObject) => void,
-|};
-
-declare export function update<UserId>(
- worker: Worker<UserId>,
- new_recipient: DirectMessageObject<UserId> | StreamObject | null,
-): void;