Skip to content

Commit 02000ea

Browse files
committed
Adjust wrong global imports
1 parent 9933383 commit 02000ea

File tree

6 files changed

+37
-29
lines changed

6 files changed

+37
-29
lines changed

src/cdn/ck/createCKCdnBaseBundlePack.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,13 @@
33
* For licensing, see LICENSE.md.
44
*/
55

6-
import type * as CKEditor from 'ckeditor5';
76
import type { CKCdnResourcesPack } from '../loadCKCdnResourcesPack';
87

98
import { createCKCdnUrl, type CKCdnVersion } from './createCKCdnUrl';
109
import { waitForWindowEntry } from '../../utils/waitForWindowEntry';
1110
import { injectScriptsInParallel } from '../../utils/injectScript';
1211

13-
/**
14-
* Type of the exported global variables of the base CKEditor bundle.
15-
*/
16-
declare global {
17-
interface Window {
18-
CKEDITOR_VERSION?: string;
19-
CKEDITOR?: typeof CKEditor;
20-
}
21-
}
12+
import './globals.d';
2213

2314
/**
2415
* Creates a pack of resources for the base CKEditor bundle.

src/cdn/ck/createCKCdnPremiumBundlePack.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,15 @@
33
* For licensing, see LICENSE.md.
44
*/
55

6-
import type * as CKEditorPremiumFeatures from 'ckeditor5-premium-features';
7-
86
import type { CKCdnResourcesPack } from '../loadCKCdnResourcesPack';
97
import type { CKCdnBaseBundlePackConfig } from './createCKCdnBaseBundlePack';
108

9+
import './globals.d';
10+
1111
import { createCKCdnUrl } from './createCKCdnUrl';
1212
import { waitForWindowEntry } from '../../utils/waitForWindowEntry';
1313
import { injectScriptsInParallel } from '../../utils/injectScript';
1414

15-
/**
16-
* Type of the exported global variables of the CKEditor Premium Features.
17-
*/
18-
declare global {
19-
interface Window {
20-
CKEDITOR_PREMIUM_FEATURES?: typeof CKEditorPremiumFeatures;
21-
}
22-
}
23-
2415
/**
2516
* Creates a pack of resources for the CKEditor Premium Features.
2617
*

src/cdn/ck/globals.d.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3+
* For licensing, see LICENSE.md.
4+
*/
5+
6+
import type * as CKEditorPremiumFeatures from 'ckeditor5-premium-features';
7+
import type * as CKEditor from 'ckeditor5';
8+
9+
/**
10+
* Exported global variables of the CKEditor and CKEditor Premium Features.
11+
*/
12+
export declare global {
13+
interface Window {
14+
CKEDITOR_VERSION?: string;
15+
CKEDITOR?: typeof CKEditor;
16+
CKEDITOR_PREMIUM_FEATURES?: typeof CKEditorPremiumFeatures;
17+
}
18+
}

src/cdn/ckbox/createCKBoxCdnBundlePack.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,7 @@ import type { CKCdnResourcesPack } from '../loadCKCdnResourcesPack';
88
import { waitForWindowEntry } from '../../utils/waitForWindowEntry';
99
import { createCKBoxCdnUrl, type CKBoxCdnVersion } from './createCKBoxCdnUrl';
1010

11-
/**
12-
* Type of the exported global variables of the base CKBox bundle.
13-
*/
14-
declare global {
15-
interface Window {
16-
CKBox?: unknown;
17-
}
18-
}
11+
import './globals.d';
1912

2013
/**
2114
* Creates a pack of resources for the base CKBox bundle.

src/cdn/ckbox/globals.d.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3+
* For licensing, see LICENSE.md.
4+
*/
5+
6+
/**
7+
* Exported global variables of the CKBox.
8+
*/
9+
export declare global {
10+
interface Window {
11+
CKBox?: any;
12+
}
13+
}

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
*/
55

66
import './globals.d';
7+
import './cdn/ck/globals.d';
8+
import './cdn/ckbox/globals.d';
79

810
export type { Awaitable } from './types/Awaitable';
911

0 commit comments

Comments
 (0)