From 14cb3735defc435d43a0fba30e6464682cf3fd5d Mon Sep 17 00:00:00 2001 From: Richard Herman <1429781+GeekyEggo@users.noreply.github.com> Date: Tue, 24 Sep 2024 22:36:13 +0100 Subject: [PATCH] refactor: default to noImplicitOverride (#42) Co-authored-by: Richard Herman --- template/src/actions/increment-counter.ts.ejs | 4 ++-- template/tsconfig.json.ejs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/template/src/actions/increment-counter.ts.ejs b/template/src/actions/increment-counter.ts.ejs index 18ae495..6289de1 100644 --- a/template/src/actions/increment-counter.ts.ejs +++ b/template/src/actions/increment-counter.ts.ejs @@ -10,7 +10,7 @@ export class IncrementCounter extends SingletonAction { * starting up, or the user navigating between pages / folders etc.. There is also an inverse of this event in the form of {@link streamDeck.client.onWillDisappear}. In this example, * we're setting the title to the "count" that is incremented in {@link IncrementCounter.onKeyDown}. */ - onWillAppear(ev: WillAppearEvent): void | Promise { + override onWillAppear(ev: WillAppearEvent): void | Promise { return ev.action.setTitle(`${ev.payload.settings.count ?? 0}`); } @@ -20,7 +20,7 @@ export class IncrementCounter extends SingletonAction { * and action information where applicable. In this example, our action will display a counter that increments by one each press. We track the current count on the action's persisted * settings using `setSettings` and `getSettings`. */ - async onKeyDown(ev: KeyDownEvent): Promise { + override async onKeyDown(ev: KeyDownEvent): Promise { // Update the count from the settings. const { settings } = ev.payload; settings.incrementBy ??= 1; diff --git a/template/tsconfig.json.ejs b/template/tsconfig.json.ejs index 3d4c726..0786510 100644 --- a/template/tsconfig.json.ejs +++ b/template/tsconfig.json.ejs @@ -5,7 +5,8 @@ "node" ], "module": "ES2022", - "moduleResolution": "Bundler" + "moduleResolution": "Bundler", + "noImplicitOverride": true }, "include": [ "src/**/*.ts"