From d104feb697be11786519a4993b22e98153812ffa Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 16 Mar 2024 05:40:55 -0500 Subject: [PATCH] chore: Add override for methods ERROR in ckeditor5-math/src/mathcommand.ts ./src/mathcommand.ts 5:8-13 [tsl] ERROR in ckeditor5-math/src/mathcommand.ts(5,9) TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'Command'. @ ./src/autoformatmath.ts 6:0-40 24:31-42 @ ./src/index.ts 5:0-61 5:0-61 ERROR in ckeditor5-math/src/mathcommand.ts ./src/mathcommand.ts 6:8-15 [tsl] ERROR in ckeditor5-math/src/mathcommand.ts(6,9) TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'Command'. @ ./src/autoformatmath.ts 6:0-40 24:31-42 @ ./src/index.ts 5:0-61 5:0-61 ERROR in ckeditor5-math/src/mathcommand.ts ./src/mathcommand.ts 48:8-15 [tsl] ERROR in ckeditor5-math/src/mathcommand.ts(48,9) TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'Command'. @ ./src/autoformatmath.ts 6:0-40 24:31-42 @ ./src/index.ts 5:0-61 5:0-61 ERROR in ckeditor5-math/src/mathui.ts ./src/mathui.ts 41:8-15 [tsl] ERROR in ckeditor5-math/src/mathui.ts(41,9) TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'Plugin'. @ ./src/autoformatmath.ts 7:0-30 33:50-56 @ ./src/index.ts 5:0-61 5:0-61 ERROR in ckeditor5-math/src/ui/mainformview.ts ./src/ui/mainformview.ts 40:8-14 [tsl] ERROR in ckeditor5-math/src/ui/mainformview.ts(40,9) TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'View'. @ ./src/mathui.ts 2:0-45 61:29-41 @ ./src/autoformatmath.ts 7:0-30 33:50-56 @ ./src/index.ts 5:0-61 5:0-61 ERROR in ckeditor5-math/src/ui/mainformview.ts ./src/ui/mainformview.ts 130:8-14 [tsl] ERROR in ckeditor5-math/src/ui/mainformview.ts(130,9) TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'View'. @ ./src/mathui.ts 2:0-45 61:29-41 @ ./src/autoformatmath.ts 7:0-30 33:50-56 @ ./src/index.ts 5:0-61 5:0-61 ERROR in ckeditor5-math/src/ui/mathview.ts ./src/ui/mathview.ts 76:8-14 [tsl] ERROR in ckeditor5-math/src/ui/mathview.ts(76,9) TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'View'. @ ./src/ui/mainformview.ts 5:0-34 48:32-40 @ ./src/mathui.ts 2:0-45 61:29-41 @ ./src/autoformatmath.ts 7:0-30 33:50-56 @ ./src/index.ts 5:0-61 5:0-61 7 errors have detailed information that is not shown. Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it. --- src/mathcommand.ts | 6 +++--- src/mathui.ts | 2 +- src/ui/mainformview.ts | 4 ++-- src/ui/mathview.ts | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mathcommand.ts b/src/mathcommand.ts index 644da0b96..5a8dbbe9f 100644 --- a/src/mathcommand.ts +++ b/src/mathcommand.ts @@ -2,8 +2,8 @@ import { Command } from 'ckeditor5/src/core'; import { getSelectedMathModelWidget } from './utils'; export default class MathCommand extends Command { - public value: string | null = null; - public execute( + public override value: string | null = null; + public override execute( equation: string, display?: boolean, outputType: 'script' | 'span' = 'script', @@ -45,7 +45,7 @@ export default class MathCommand extends Command { public display = false; - public refresh(): void { + public override refresh(): void { const model = this.editor.model; const selection = model.document.selection; const selectedElement = selection.getSelectedElement(); diff --git a/src/mathui.ts b/src/mathui.ts index 92bc290b2..12a9b2776 100644 --- a/src/mathui.ts +++ b/src/mathui.ts @@ -38,7 +38,7 @@ export default class MathUI extends Plugin { this._enableUserBalloonInteractions(); } - public destroy(): void { + public override destroy(): void { super.destroy(); this.formView?.destroy(); diff --git a/src/ui/mainformview.ts b/src/ui/mainformview.ts index 0af0e8ab8..dc4897868 100644 --- a/src/ui/mainformview.ts +++ b/src/ui/mainformview.ts @@ -37,7 +37,7 @@ export default class MainFormView extends View { public previewEnabled: boolean; public previewLabel?: LabelView; public mathView?: MathView; - public locale: Locale = new Locale(); + public override locale: Locale = new Locale(); public lazyLoad: undefined | ( () => Promise ); constructor( @@ -127,7 +127,7 @@ export default class MainFormView extends View { } ); } - public render(): void { + public override render(): void { super.render(); // Prevent default form submit event & trigger custom 'submit' diff --git a/src/ui/mathview.ts b/src/ui/mathview.ts index ac8c3a574..5ee587d16 100644 --- a/src/ui/mathview.ts +++ b/src/ui/mathview.ts @@ -73,7 +73,7 @@ export default class MathView extends View { } } - public render(): void { + public override render(): void { super.render(); this.updateMath(); }