Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
global: Convert TypeScript declarations to module.
Anders Kaseorg74237dfd4cb6
diff --git a/web/src/global.d.ts b/web/src/global.d.tsindex d420716160e..1cf73a51130 100644--- a/web/src/global.d.ts+++ b/web/src/global.d.ts@@ -5,7 +5,7 @@/// <reference types="spectrum" />-declare let zulip_test: any; // eslint-disable-line @typescript-eslint/no-explicit-any+export {};type JQueryCaretRange = {start: number;@@ -22,34 +22,38 @@ type JQueryIdleOptions = Partial<{keepTracking: boolean;}>;-declare namespace JQueryValidation {+declare global {+ let zulip_test: any; // eslint-disable-line @typescript-eslint/no-explicit-any++ namespace JQueryValidation {+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions+ interface ValidationOptions {+ // This is only defined so that this.defaultShowErrors!() can be called from showErrors.+ // It isn't really a validation option to be supplied.+ defaultShowErrors?: () => void;+ }+ }+// eslint-disable-next-line @typescript-eslint/consistent-type-definitions- interface ValidationOptions {- // This is only defined so that this.defaultShowErrors!() can be called from showErrors.- // It isn't really a validation option to be supplied.- defaultShowErrors?: () => void;+ interface JQuery {+ expectOne: () => this;+ get_offset_to_window: () => DOMRect;+ tab: (action?: string) => this; // From web/third/bootstrap++ // Types for jquery-caret-plugin+ caret: (() => number) & ((arg: number | string) => this);+ range: (() => JQueryCaretRange) &+ ((start: number, end?: number) => this) &+ ((text: string) => this);+ selectAll: () => this;+ deselectAll: () => this;++ // Types for jquery-idle plugin+ idle: (opts: JQueryIdleOptions) => {+ cancel: () => void;+ reset: () => void;+ };}-}-// eslint-disable-next-line @typescript-eslint/consistent-type-definitions-interface JQuery {- expectOne: () => this;- get_offset_to_window: () => DOMRect;- tab: (action?: string) => this; // From web/third/bootstrap-- // Types for jquery-caret-plugin- caret: (() => number) & ((arg: number | string) => this);- range: (() => JQueryCaretRange) &- ((start: number, end?: number) => this) &- ((text: string) => this);- selectAll: () => this;- deselectAll: () => this;-- // Types for jquery-idle plugin- idle: (opts: JQueryIdleOptions) => {- cancel: () => void;- reset: () => void;- };+ const ZULIP_VERSION: string;}--declare const ZULIP_VERSION: string;