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.

types: Upstream winchan types to DefinitelyTyped.

Anders Kaseorgd33d52f3afaf
diff --git a/package.json b/package.json
index e14550bf16c..dd49c3a0071 100644
--- a/package.json
+++ b/package.json
@@ -120,6 +120,7 @@
"@types/throttle-debounce": "^5.0.2",
"@types/tinycolor2": "^1.4.5",
"@types/turndown": "^5.0.1",
+ "@types/winchan": "^0.2.0",
"@typescript-eslint/eslint-plugin": "^8.2.0",
"@typescript-eslint/parser": "^8.2.0",
"babel-plugin-istanbul": "^7.0.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 576e9c0ec62..b198535ab10 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -377,6 +377,9 @@ importers:
'@types/turndown':
specifier: ^5.0.1
version: 5.0.5
+ '@types/winchan':
+ specifier: ^0.2.0
+ version: 0.2.0
'@typescript-eslint/eslint-plugin':
specifier: ^8.2.0
@@ -2810,6 +2813,9 @@ packages:
resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==}
+ '@types/[email protected]':
+ resolution: {integrity: sha512-1NyyjFkmpFf9T5hpyB1KgS4kljPwy45nxaq/I6CndEU2kw6BpxzFIAa0SXs620EtnEsvkFljquX+yRdlLxqDkA==}
+
resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==}
@@ -12190,6 +12196,8 @@ snapshots:
'@types/[email protected]': {}
+ '@types/[email protected]': {}
+
dependencies:
'@types/node': 22.15.6
diff --git a/version.py b/version.py
index 1230d435c72..1fe8743b08b 100644
--- a/version.py
+++ b/version.py
@@ -49,4 +49,4 @@ API_FEATURE_LEVEL = 390
# historical commits sharing the same major version, in which case a
# minor version bump suffices.
-PROVISION_VERSION = (326, 6) # bumped 2025-05-20 to add pydantic-partials
+PROVISION_VERSION = (326, 7) # bumped 2025-05-23 to add @types/winchan
diff --git a/web/src/types/winchan.d.ts b/web/src/types/winchan.d.ts
deleted file mode 100644
index c6cda08d7ba..00000000000
--- a/web/src/types/winchan.d.ts
+++ /dev/null
@@ -1,64 +0,0 @@
-// Types for https://www.npmjs.com/package/winchan
-
-/**
- * Opens a window and initiates a cross-domain request. Call this from the
- * "untrusted" or "client" site.
- *
- * @param options - Options for `open`
- * @param responseCallback - Called when the request completes with a response
- * or an error
- */
-export function open(
- options: {
- /**
- * URL of the "trusted" window
- */
- url: string;
- /**
- * URL of the `relay.html` iframe (used for Internet Explorer support)
- */
- relay_url: string;
- /**
- * Target name passed to `window.open`
- */
- window_name?: string | undefined;
- /**
- * Comma-separated features passed to `window.open`
- */
- window_features?: string | undefined;
- /**
- * Application-defined parameters for the request
- */
- params?: unknown;
- },
- responseCallback: (err: string | null, response?: unknown) => void,
-): {
- /**
- * Closes the window.
- */
- close: () => void;
- /**
- * Tries to move the focus to the window.
- */
- focus: () => void;
-};
-
-/**
- * Listens for a request. Call this from the "trusted" site providing the
- * window.
- *
- * @param requestCallback - Called to initiate the request
- */
-export function onOpen(
- requestCallback: (
- origin: string,
- params: unknown,
- sendResponse: (response: unknown) => void,
- ) => void,
-): {
- /**
- * Detaches the channel without sending a response yet. Call this before
- * navigating to another page in a multi-page dialog.
- */
- detach: () => void;
-};