From 2f91eb684b7dbc7f0dedbc63364fc5ed124e2c8a Mon Sep 17 00:00:00 2001 From: woxtu Date: Mon, 16 May 2022 21:07:15 +0900 Subject: [PATCH] Add type annotations --- pyscriptjs/src/components/pyrepl.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyscriptjs/src/components/pyrepl.ts b/pyscriptjs/src/components/pyrepl.ts index 0bf4eb00..329a9ec8 100644 --- a/pyscriptjs/src/components/pyrepl.ts +++ b/pyscriptjs/src/components/pyrepl.ts @@ -32,7 +32,7 @@ mode.subscribe(value => { currentMode = value; }); -function createCmdHandler(el) { +function createCmdHandler(el: PyRepl): StateCommand { // Creates a codemirror cmd handler that calls the el.evaluate when an event // triggers that specific cmd const toggleCheckbox: StateCommand = ({ state, dispatch }) => { @@ -41,7 +41,7 @@ function createCmdHandler(el) { return toggleCheckbox; } -let initialTheme; +let initialTheme: string; function getEditorTheme(el: BaseEvalElement): string { if (initialTheme) { return initialTheme;