From dcf3164b8ddafcd972b4a65a4fe9255b2dfe7077 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Mon, 27 Apr 2026 20:23:57 +0200 Subject: [PATCH] fix: do not export internal globals declaration The globals are only used internally and should not be part of the distributed files. Signed-off-by: Ferdinand Thiessen --- lib/globals.d.ts | 17 +++++++++++++++++ lib/index.ts | 14 ++------------ 2 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 lib/globals.d.ts diff --git a/lib/globals.d.ts b/lib/globals.d.ts new file mode 100644 index 0000000..29a05d7 --- /dev/null +++ b/lib/globals.d.ts @@ -0,0 +1,17 @@ +/* + * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +declare global { + interface Window { + _notify_push_listeners: { [event: string]: ((string, any) => void)[] }, + _notify_push_ws: WebSocket | null | true, + _notify_push_online: boolean, + _notify_push_available: boolean, + _notify_push_error_count: number, + _notify_push_ready: boolean, + } +} + +export {} diff --git a/lib/index.ts b/lib/index.ts index b8df635..73d9737 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -1,22 +1,12 @@ -/** +/* * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + import {getCapabilities} from '@nextcloud/capabilities'; import axios from '@nextcloud/axios' import {subscribe} from '@nextcloud/event-bus' -declare global { - interface Window { - _notify_push_listeners: { [event: string]: ((string, any) => void)[] }, - _notify_push_ws: WebSocket | null | true, - _notify_push_online: boolean, - _notify_push_available: boolean, - _notify_push_error_count: number, - _notify_push_ready: boolean, - } -} - type NotifyPushOptions = { credentials?: { username: string,