Improve Ckeditor/Types.ts
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 20 Apr 2023 13:07:17 +0000 (15:07 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 20 Apr 2023 13:07:50 +0000 (15:07 +0200)
ts/WoltLabSuite/Core/Component/Ckeditor/Types.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Component/Ckeditor/Types.js

index d58d208cf245052403fec309f504d8f75028f207..c13507cf1eb1e5e6089867e771fa410cc6660494 100644 (file)
@@ -1,6 +1,19 @@
+/**
+ * Collects imports for core CKEditor types in a central location.
+ *
+ * @author Tim Duesterhus
+ * @copyright 2001-2023 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @since 6.0
+ */
+
 export type { ClassicEditor } from "@ckeditor/ckeditor5-editor-classic";
 export type { EditorConfig } from "@ckeditor/ckeditor5-core";
 export type { Element } from "@ckeditor/ckeditor5-engine";
 
-import "@ckeditor/ckeditor5-autosave";
-import "@ckeditor/ckeditor5-mention";
+// We only want these for the configuration augmentation.
+// `import type "foo"` is not valid syntax, but simply importing
+// nothing works properly. The augmentation will happen, but
+// no symbols will be emitted.
+import type {} from "@ckeditor/ckeditor5-autosave";
+import type {} from "@ckeditor/ckeditor5-mention";
index 1aa7d8885cf463e74edf5db58ed78ef265a9e228..dbca045dc830ad17666520bda2869a8108d61db8 100644 (file)
@@ -1,4 +1,12 @@
-define(["require", "exports", "@ckeditor/ckeditor5-autosave", "@ckeditor/ckeditor5-mention"], function (require, exports) {
+/**
+ * Collects imports for core CKEditor types in a central location.
+ *
+ * @author Tim Duesterhus
+ * @copyright 2001-2023 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @since 6.0
+ */
+define(["require", "exports"], function (require, exports) {
     "use strict";
     Object.defineProperty(exports, "__esModule", { value: true });
 });