Skip to content

Commit

Permalink
refactor: default to noImplicitOverride (#42)
Browse files Browse the repository at this point in the history
Co-authored-by: Richard Herman <[email protected]>
  • Loading branch information
GeekyEggo and GeekyEggo authored Sep 24, 2024
1 parent 641bdfd commit 14cb373
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions template/src/actions/increment-counter.ts.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class IncrementCounter extends SingletonAction<CounterSettings> {
* 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<CounterSettings>): void | Promise<void> {
override onWillAppear(ev: WillAppearEvent<CounterSettings>): void | Promise<void> {
return ev.action.setTitle(`${ev.payload.settings.count ?? 0}`);
}

Expand All @@ -20,7 +20,7 @@ export class IncrementCounter extends SingletonAction<CounterSettings> {
* 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<CounterSettings>): Promise<void> {
override async onKeyDown(ev: KeyDownEvent<CounterSettings>): Promise<void> {
// Update the count from the settings.
const { settings } = ev.payload;
settings.incrementBy ??= 1;
Expand Down
3 changes: 2 additions & 1 deletion template/tsconfig.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"node"
],
"module": "ES2022",
"moduleResolution": "Bundler"
"moduleResolution": "Bundler",
"noImplicitOverride": true
},
"include": [
"src/**/*.ts"
Expand Down

0 comments on commit 14cb373

Please sign in to comment.