Skip to content

Commit dcf3164

Browse files
committed
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 <opensource@fthiessen.de>
1 parent 2d1fda7 commit dcf3164

2 files changed

Lines changed: 19 additions & 12 deletions

File tree

lib/globals.d.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
3+
* SPDX-License-Identifier: AGPL-3.0-or-later
4+
*/
5+
6+
declare global {
7+
interface Window {
8+
_notify_push_listeners: { [event: string]: ((string, any) => void)[] },
9+
_notify_push_ws: WebSocket | null | true,
10+
_notify_push_online: boolean,
11+
_notify_push_available: boolean,
12+
_notify_push_error_count: number,
13+
_notify_push_ready: boolean,
14+
}
15+
}
16+
17+
export {}

lib/index.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
1-
/**
1+
/*
22
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
5+
56
import {getCapabilities} from '@nextcloud/capabilities';
67
import axios from '@nextcloud/axios'
78
import {subscribe} from '@nextcloud/event-bus'
89

9-
declare global {
10-
interface Window {
11-
_notify_push_listeners: { [event: string]: ((string, any) => void)[] },
12-
_notify_push_ws: WebSocket | null | true,
13-
_notify_push_online: boolean,
14-
_notify_push_available: boolean,
15-
_notify_push_error_count: number,
16-
_notify_push_ready: boolean,
17-
}
18-
}
19-
2010
type NotifyPushOptions = {
2111
credentials?: {
2212
username: string,

0 commit comments

Comments
 (0)