From cc00c5fbd70a8b95e22dd28027d73d666a7ac907 Mon Sep 17 00:00:00 2001 From: chavlin Date: Thu, 19 Sep 2024 12:49:29 -0500 Subject: [PATCH 1/2] define events as hash instead of method --- .gitignore | 8 ++++++++ src/fullscreen.ts | 6 +----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index f48aa49..35294ff 100644 --- a/.gitignore +++ b/.gitignore @@ -110,3 +110,11 @@ dmypy.json # OSX files .DS_Store + +# pycharm +.idea/ + +# yarn build related +.yarn/ +.yarnrc.yml +yarn.lock diff --git a/src/fullscreen.ts b/src/fullscreen.ts index dbf274c..79be291 100644 --- a/src/fullscreen.ts +++ b/src/fullscreen.ts @@ -89,11 +89,7 @@ export class FullscreenButtonView extends DOMWidgetView { /** * Dictionary of events and handlers */ - events(): { [e: string]: string } { - // TODO: return typing not needed in Typescript later than 1.8.x - // See http://stackoverflow.com/questions/22077023/why-cant-i-indirectly-return-an-object-literal-to-satisfy-an-index-signature-re and https://github.com/Microsoft/TypeScript/pull/7029 - return { click: '_handle_click' }; - } + events: { [e: string]: string } = { click: '_handle_click' }; /** * Handles when the button is clicked. From ad9f4ffef165572af0e2940bf501d5bc8861736b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 19 Sep 2024 19:59:19 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 35294ff..4c81b4f 100644 --- a/.gitignore +++ b/.gitignore @@ -111,10 +111,10 @@ dmypy.json # OSX files .DS_Store -# pycharm +# pycharm .idea/ -# yarn build related +# yarn build related .yarn/ .yarnrc.yml yarn.lock