mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 16:37:23 +00:00
dialog_widget: Refactor AjaxRequest type and moved it to types.ts.
Changes `AjaxRequest` name to more clear one `AjaxRequestHandler`, also moved this type to `types.ts` with a comment to move it into `channel.js` once it migrates to typescript.
This commit is contained in:
@@ -69,3 +69,12 @@ export type UpdateMessageEvent = {
|
||||
// TODO/typescript: Move the User and Stream placeholder
|
||||
// types to their appropriate modules.
|
||||
export type User = Record<string, never>;
|
||||
|
||||
// TODO/typescript: Move this to channel
|
||||
export type AjaxRequestHandler = (args: {
|
||||
url: string;
|
||||
data?: Record<string, unknown> | string | unknown[];
|
||||
ignoreReload?: boolean;
|
||||
success?(response_data: unknown, textStatus: string, jqXHR: JQuery.jqXHR): void;
|
||||
error?(xhr: JQuery.jqXHR, error_type: string, xhn: string): void;
|
||||
}) => void;
|
||||
|
||||
Reference in New Issue
Block a user