Skip to content

Build your personal knowledge base with Trilium Notes

refactor(ckeditor5): add explicit override

Elian Doran3eddb55aa281
diff --git a/packages/ckeditor5/src/plugins/copy_to_clipboard_button.ts b/packages/ckeditor5/src/plugins/copy_to_clipboard_button.ts
index 638e4e4230..836549fb1c 100644
--- a/packages/ckeditor5/src/plugins/copy_to_clipboard_button.ts
+++ b/packages/ckeditor5/src/plugins/copy_to_clipboard_button.ts
@@ -29,7 +29,7 @@ export class CopyToClipboardCommand extends Command {
private executeCallback?: (text: string) => void;
- execute(...args: Array<unknown>) {
+ override execute(...args: Array<unknown>) {
const editor = this.editor;
const model = editor.model;
const selection = model.document.selection;
diff --git a/packages/ckeditor5/src/plugins/file_upload/fileuploadcommand.ts b/packages/ckeditor5/src/plugins/file_upload/fileuploadcommand.ts
index 1d6b2981dc..d5a2c7237c 100644
--- a/packages/ckeditor5/src/plugins/file_upload/fileuploadcommand.ts
+++ b/packages/ckeditor5/src/plugins/file_upload/fileuploadcommand.ts
@@ -5,7 +5,7 @@ interface FileUploadOpts {
}
export default class FileUploadCommand extends Command {
- refresh() {
+ override refresh() {
this.isEnabled = true;
}
@@ -16,7 +16,7 @@ export default class FileUploadCommand extends Command {
* @param {Object} options Options for the executed command.
* @param {File|Array.<File>} options.file The file or an array of files to upload.
*/
- execute( options: FileUploadOpts ) {
+ override execute( options: FileUploadOpts ) {
const editor = this.editor;
const model = editor.model;
diff --git a/packages/ckeditor5/src/plugins/includenote.ts b/packages/ckeditor5/src/plugins/includenote.ts
index c6dd615baa..0c71490785 100644
--- a/packages/ckeditor5/src/plugins/includenote.ts
+++ b/packages/ckeditor5/src/plugins/includenote.ts
@@ -135,14 +135,14 @@ class IncludeNoteEditing extends Plugin {
}
class InsertIncludeNoteCommand extends Command {
- execute() {
+ override execute() {
const editorEl = this.editor.editing.view.getDomRoot();
const component = glob.getComponentByEl(editorEl);
component.triggerCommand('addIncludeNoteToText');
}
- refresh() {
+ override refresh() {
const model = this.editor.model;
const selection = model.document.selection;
const firstPosition = selection.getFirstPosition();
diff --git a/packages/ckeditor5/src/plugins/move_block_updown.ts b/packages/ckeditor5/src/plugins/move_block_updown.ts
index 580c8dbe4c..3c955b6d14 100644
--- a/packages/ckeditor5/src/plugins/move_block_updown.ts
+++ b/packages/ckeditor5/src/plugins/move_block_updown.ts
@@ -34,7 +34,7 @@ abstract class MoveBlockUpDownCommand extends Command {
abstract getSibling(selectedBlock: Element);
abstract get offset(): "before" | "after";
- refresh() {
+ override refresh() {
const selection = this.editor.model.document.selection;
const selectedBlocks = this.getSelectedBlocks(selection);
@@ -44,7 +44,7 @@ abstract class MoveBlockUpDownCommand extends Command {
}
}
- execute() {
+ override execute() {
const model = this.editor.model;
const selection = model.document.selection;
const selectedBlocks = this.getSelectedBlocks(selection);
diff --git a/packages/ckeditor5/src/plugins/referencelink.ts b/packages/ckeditor5/src/plugins/referencelink.ts
index 47662940bf..106065ec60 100644
--- a/packages/ckeditor5/src/plugins/referencelink.ts
+++ b/packages/ckeditor5/src/plugins/referencelink.ts
@@ -8,7 +8,7 @@ export default class ReferenceLink extends Plugin {
class ReferenceLinkCommand extends Command {
- execute({ href }: { href: string }) {
+ override execute({ href }: { href: string }) {
if (!href?.trim()) {
return;
}
@@ -29,7 +29,7 @@ class ReferenceLinkCommand extends Command {
});
}
- refresh() {
+ override refresh() {
const model = this.editor.model;
const selection = model.document.selection;
this.isEnabled = selection.focus !== null && model.schema.checkChild(selection.focus.parent as Element, 'reference');