From 8c23535e866fc5477994d686dfc1f50bef9fc443 Mon Sep 17 00:00:00 2001 From: Peter Fajdiga Date: Wed, 16 Apr 2025 23:50:14 +0200 Subject: [PATCH] use `as` type assertions --- src/lib/utils/Delayer.ts | 4 ++-- src/lib/utils/ShortcutAction.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/utils/Delayer.ts b/src/lib/utils/Delayer.ts index 25be2da..93326ee 100644 --- a/src/lib/utils/Delayer.ts +++ b/src/lib/utils/Delayer.ts @@ -17,9 +17,9 @@ class Delayer { } function initQmlTimer() { - return Qt.createQmlObject( + return Qt.createQmlObject( `import QtQuick 6.0 Timer {}`, qmlBase - ); + ) as QmlTimer; } diff --git a/src/lib/utils/ShortcutAction.ts b/src/lib/utils/ShortcutAction.ts index 90507f7..2067256 100644 --- a/src/lib/utils/ShortcutAction.ts +++ b/src/lib/utils/ShortcutAction.ts @@ -16,7 +16,7 @@ class ShortcutAction { ` : ""; - return Qt.createQmlObject( + return Qt.createQmlObject( `import QtQuick 6.0 import org.kde.kwin 3.0 ShortcutHandler { @@ -24,7 +24,7 @@ ShortcutHandler { text: "Karousel: ${keyBinding.description}"; ${sequenceLine}}`, qmlBase, - ); + ) as ShortcutHandler; } }