From 3ca4b3efb320835870d726b7c88105b13c8b6e4a Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 2 Nov 2022 08:56:23 +0400 Subject: [PATCH] Move EditorView to TS --- src/code_manager/view/{EditorView.js => EditorView.ts} | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) rename src/code_manager/view/{EditorView.js => EditorView.ts} (79%) diff --git a/src/code_manager/view/EditorView.js b/src/code_manager/view/EditorView.ts similarity index 79% rename from src/code_manager/view/EditorView.js rename to src/code_manager/view/EditorView.ts index 7e7e27b16..e001fcfb3 100644 --- a/src/code_manager/view/EditorView.js +++ b/src/code_manager/view/EditorView.ts @@ -2,7 +2,10 @@ import { View } from '../../common'; import html from '../../utils/html'; export default class EditorView extends View { - template({ pfx, codeName, label }) { + pfx?: string; + config!: Record; + + template({ pfx, codeName, label }: { pfx: string; codeName: string; label: string }) { return html`
${label}
@@ -11,7 +14,7 @@ export default class EditorView extends View { `; } - initialize(o) { + initialize(o: any) { this.config = o.config || {}; this.pfx = this.config.stylePrefix; }